dsmiley commented on code in PR #2524: URL: https://github.com/apache/solr/pull/2524#discussion_r1654698142
########## solr/core/src/test/org/apache/solr/search/TestSearchPerf.java: ########## @@ -173,7 +172,14 @@ private long doListGen(Query q, List<Query> filt) throws Exception { long ret = 0; for (int i = 0; i < ITERATIONS; i++) { DocList l = - searcher.getDocList(q, filt, (Sort) null, 0, 10, SolrIndexSearcher.NO_CHECK_QCACHE); + new QueryCommand() + .setQuery(q) + .setFilterList(filt) + .setOffset(0) Review Comment: The default is -1 and there are no safeguards around interpreting that so I can't remove this line. I think the default *should* be 0 but it isn't :-( ########## solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java: ########## @@ -403,14 +403,9 @@ public void process(ResponseBuilder rb) throws IOException { req.getContext().put(SolrIndexSearcher.STATS_SOURCE, statsCache.get(req)); - QueryResult result = new QueryResult(); - cmd.setSegmentTerminateEarly( params.getBool( CommonParams.SEGMENT_TERMINATE_EARLY, CommonParams.SEGMENT_TERMINATE_EARLY_DEFAULT)); - if (cmd.getSegmentTerminateEarly()) { - result.setSegmentTerminatedEarly(Boolean.FALSE); - } Review Comment: Do you mean for grouping, which apparently doesn't support early termination? ########## solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java: ########## @@ -421,22 +416,22 @@ public void process(ResponseBuilder rb) throws IOException { cmd.setSegmentTerminateEarly(false); try { if (params.getBool(GroupParams.GROUP_DISTRIBUTED_FIRST, false)) { - doProcessGroupedDistributedSearchFirstPhase(rb, cmd, result); + doProcessGroupedDistributedSearchFirstPhase(rb, cmd); return; } else if (params.getBool(GroupParams.GROUP_DISTRIBUTED_SECOND, false)) { - doProcessGroupedDistributedSearchSecondPhase(rb, cmd, result); + doProcessGroupedDistributedSearchSecondPhase(rb, cmd); return; } - doProcessGroupedSearch(rb, cmd, result); + doProcessGroupedSearch(rb, cmd); Review Comment: I agree, and I think we should do more than that. One "return" statement for the whole grouping section; no need to have just for GROUP_DISTRIBUTED_FIRST and SECOND. -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org