<freeStyleBuild _class='hudson.model.FreeStyleBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "Lucene-main-Windows" build number 21,472</shortDescription><upstreamBuild>21472</upstreamBuild><upstreamProject>Lucene-main-Windows</upstreamProject><upstreamUrl>job/Lucene-main-Windows/</upstreamUrl></cause></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><refsremotesoriginmain _class='hudson.plugins.git.util.Build'><buildNumber>18557</buildNumber><marked><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><branch><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><name>refs/remotes/origin/main</name></branch></marked><revision><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><branch><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><name>refs/remotes/origin/main</name></branch></revision></refsremotesoriginmain></buildsByBranchName><lastBuiltRevision><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><branch><SHA1>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</SHA1><name>refs/remotes/origin/main</name></branch></lastBuiltRevision><remoteUrl>https://gitbox.apache.org/repos/asf/lucene.git</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='hudson.model.ParametersAction'></action><action _class='hudson.tasks.junit.TestResultAction'><failCount>0</failCount><skipCount>790</skipCount><totalCount>19275</totalCount><urlName>testReport</urlName></action><action></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><description>Java: 64bit/hotspot/jdk-25.0.4 -XX:-UseCompressedOops -XX:+UseSerialGC</description><displayName>#18557</displayName><duration>653225</duration><estimatedDuration>697758</estimatedDuration><fullDisplayName>Lucene-main-macOS #18557</fullDisplayName><id>18557</id><inProgress>false</inProgress><keepLog>false</keepLog><number>18557</number><queueId>238759</queueId><result>SUCCESS</result><timestamp>1793286817575</timestamp><url>https://jenkins.thetaphi.de/view/Lucene/job/Lucene-main-macOS/18557/</url><builtOn>macOS VM</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>lucene/core/src/java/org/apache/lucene/search/Sort.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/SortField.java</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/search/TestSortOptimization.java</affectedPath><affectedPath>lucene/MIGRATE.md</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollectorEarlyTermination.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/NonPruningSortField.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/FieldComparator.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/LeafFieldComparator.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/IndexSortedLeafFieldComparator.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/SortedSetSortField.java</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/search/TestNonPruningSortField.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java</affectedPath><affectedPath>lucene/CHANGES.txt</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/SortedNumericSortField.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java</affectedPath><commitId>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</commitId><timestamp>1793282552000</timestamp><author><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></author><authorEmail>noreply@github.com</authorEmail><comment>Consolidate Sort pruning logic (#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 commit 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.
</comment><date>2026-10-29 14:02:32 +0000</date><id>70a428b5ba90cdbcf3c8380e21b006a68b4dcb85</id><msg>Consolidate Sort pruning logic (#16857)</msg><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/Sort.java</file></path><path><editType>edit</editType><file>lucene/MIGRATE.md</file></path><path><editType>add</editType><file>lucene/core/src/test/org/apache/lucene/search/TestNonPruningSortField.java</file></path><path><editType>add</editType><file>lucene/core/src/java/org/apache/lucene/search/IndexSortedLeafFieldComparator.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/SortedSetSortField.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/SortField.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/TopFieldCollectorManager.java</file></path><path><editType>edit</editType><file>lucene/CHANGES.txt</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/FieldComparator.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollectorEarlyTermination.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/LeafFieldComparator.java</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/search/TestSortOptimization.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/SortedNumericSortField.java</file></path><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java</file></path><path><editType>add</editType><file>lucene/core/src/java/org/apache/lucene/search/NonPruningSortField.java</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></culprit></freeStyleBuild>