Skip to content

Commit

Permalink
Stop bounding outer window.
Browse files Browse the repository at this point in the history
Currently `MaxScoreBulkScorer` requires its "outer" window to be at least
`WINDOW_SIZE`. The intuition there was that we should make sure we should use
the whole range of the bit set that we are using to collect matches. The
downside is that it may force us to use an upper level in the skip list that
has worse upper bounds for the scores.

luceneutil suggests that this is not a good trade-off: removing this
requirement makes some queries a bit slower, but `OrHighMin` and `OrHighRare`
much faster.
  • Loading branch information
jpountz committed Jul 17, 2024
1 parent 22ca695 commit 86d191a
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,6 @@ private int computeOuterWindowMax(int windowMin) throws IOException {
windowMax = (int) Math.min(windowMax, upTo + 1L); // upTo is inclusive
}

// Score at least an entire inner window of docs
windowMax =
Math.max(
windowMax, (int) Math.min(Integer.MAX_VALUE, (long) windowMin + INNER_WINDOW_SIZE));

return windowMax;
}

Expand Down

0 comments on commit 86d191a

Please sign in to comment.