forked from apache/lucene-solr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LUCENE-9599 Make comparator aware of index sorting
Currently, if search sort is equal to index sort, we have an early termination in TopFieldCollector. As we work to enhance comparators to provide skipping functionality (PR apache#1351), we would like to move this termination functionality on index sort from TopFieldCollector to comparators. This patch does the following: - Add method usesIndexSort to LeafFieldComparator - Make numeric comparators aware of index sort and early terminate on collecting all competitive hits - Move TermValComparator and TermOrdValComparator from FieldComparator to comparator package, for all comparators to be in the same package - Enhance TermValComparator to provide skipping functionality when index is sorted One item left for TODO for a following PR is to remove the logic of early termniation from TopFieldCollector. We can do that once we ensure that all BulkScorers are using iterators from collectors than can skip non-competitive docs. Relates to apache#1351
- Loading branch information
1 parent
656ce93
commit fff115b
Showing
15 changed files
with
686 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.