serhiy-bzhezytskyy commented on code in PR #4804:
URL: https://github.com/apache/solr/pull/4804#discussion_r3868839719
##########
solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc:
##########
@@ -435,6 +435,9 @@ of the distributed query processing.
== segmentTerminateEarly Parameter
+WARNING: Deprecated since 11.0. Its implementation relies on internal Lucene
behavior that cannot
+currently be replicated using Lucene's own public early-termination support
(see SOLR-18363).
+
Review Comment:
Added -- see the updated WARNING and changelog, both now point to
`minExactCount`.
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1802,11 +1799,74 @@ TopDocsCollector<? extends ScoreDoc>
buildTopDocsCollector(int len, QueryCommand
final CursorMark cursor = cmd.getCursorMark();
final FieldDoc searchAfter = (null != cursor ?
cursor.getSearchAfterFieldDoc() : null);
+ if (allowNativeSegmentTerminateEarly) {
+ minNumFound = 0;
Review Comment:
Confirmed equivalent -- `TopFieldCollector`'s constructor clamps
`totalHitsThreshold` to `Math.max(totalHitsThreshold, numHits)` internally
(Lucene 10.4.0, `TopFieldCollector.java:335`), so `0` and `len` produce the
same effective threshold. Switched to `len`.
--
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]