serhiy-bzhezytskyy opened a new pull request, #4804: URL: https://github.com/apache/solr/pull/4804
https://issues.apache.org/jira/browse/SOLR-18363 Removes `EarlyTerminatingSortingCollector` in favor of native `TopFieldCollector` early termination, as the ticket asks. Forces `TopFieldCollectorManager`'s `totalHitsThreshold` down to `len` when `segmentTerminateEarly=true` -- Lucene does the same per-segment skip natively. `TopFieldCollector#isEarlyTerminated()` isn't the right signal to read back (it also fires on routine hit-count overflow, unrelated to sort), so a thin `SegmentTerminatedEarlyObserver` catches `CollectionTerminatedException` directly instead -- Lucene only throws that from the sort-compatible fast path. With this, `TestSegmentSorting` passes with its original, unmodified assertions. One gap: `RankQuery` + `segmentTerminateEarly=true` (untested before too) now logs "unsupported combination" instead of silently no-oping. Also deprecates the public surface (`SEGMENT_TERMINATE_EARLY`, the response header, `QueryCommand`'s accessors) -- only the internal class was deprecated before. AI-assisted (Claude Sonnet 5) -- 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]
