Skip to content

Commit

Permalink
Speed up PostingsEnum when reading positions. (apache#14032)
Browse files Browse the repository at this point in the history
This PR changes the following:
 - As much work as possible is moved from `nextDoc()`/`advance()` to
   `nextPosition()`. This helps only pay the overhead of reading positions when
   all query terms agree on a candidate.
 - Frequencies are read lazily. Again, this helps in case a document is needed
   in a block, but clauses do not agree on a common candidate match, so
   frequencies are never decoded.
 - A few other minor optimizations.
  • Loading branch information
jpountz authored Dec 2, 2024
1 parent 067b472 commit b2a10e3
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 110 deletions.
3 changes: 3 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ Optimizations
* GITHUB#14023: Make JVM inlining decisions more predictable in our main
queries. (Adrien Grand)

* GITHUB#14032: Speed up PostingsEnum when positions are requested.
(Adrien Grand)

Bug Fixes
---------------------
* GITHUB#13832: Fixed an issue where the DefaultPassageFormatter.format method did not format passages as intended
Expand Down
Loading

0 comments on commit b2a10e3

Please sign in to comment.