You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "HoustonPutman (via GitHub)" <gi...@apache.org> on 2025/04/02 19:23:55 UTC
Re: [PR] SOLR-17447 : Support to early terminate a search based on maxHits per collector. [solr]
HoustonPutman commented on code in PR #2960:
URL: https://github.com/apache/solr/pull/2960#discussion_r2025456485
##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -295,7 +295,7 @@ private Collector buildAndRunCollectorChain(
final boolean terminateEarly = cmd.getTerminateEarly();
if (terminateEarly) {
- collector = new EarlyTerminatingCollector(collector, cmd.getLen());
+ collector = new EarlyTerminatingCollector(collector, cmd.getMaxHitsTerminateEarly());
Review Comment:
Yeah, Gus is right. `SpellCheckCollator::collate` uses it: `checkResponse.setFieldFlags(f |= SolrIndexSearcher.TERMINATE_EARLY)`. So we need to refactor this to use it correctly. I'm going to refactor this to use the new functionality under the hood. Then we can truly remove the TerminateEarly stuff
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org