Skip to content

Commit

Permalink
Stop requiring MaxScoreBulkScorer's outer window from having at least…
Browse files Browse the repository at this point in the history
… INNER_WINDOW_SIZE docs. (#13582)

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.
  • Loading branch information
jpountz authored Jul 18, 2024
1 parent 22ca695 commit fff997f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ Optimizations
* GITHUB#12100: WordBreakSpellChecker.suggestWordBreaks now does a breadth first search, allowing it to return
better matches with fewer evaluations (hossman)

* GITHUB#13582: Stop requiring MaxScoreBulkScorer's outer window from having at
least INNER_WINDOW_SIZE docs. (Adrien Grand)

Changes in runtime behavior
---------------------

Expand Down
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 fff997f

Please sign in to comment.