romseygeek opened a new pull request, #16857: URL: https://github.com/apache/lucene/pull/16857
Whether or not to use index-sort based early termination or index-value based sort pruning is currently scattered around several different classes at both index and segment level, making it difficult to add further optimizations. This change consolidates these decisions into segment-level logic centred on FieldValueHitQueue, with value-based pruning handled via getLeafComparator and index-sort-based pruning handled in a new comparator class, IndexSortedLeafFieldComparator. In addition, the deprecated methods on SortField that allow users to disable pruning are removed and replaced by a new wrapper class. This has the advantage of removing one more mutable field from SortField, and also makes it clear that it only applies to search-time sorts. This will allow future improvements around individual segment-based sorts - for example, we will be able to make use of the effective primary sort field optimizations that detect whether or not leading sort fields are no-ops on individual segments. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
