cpoerschke commented on a change in pull request #248:
URL: https://github.com/apache/solr/pull/248#discussion_r696879443
##########
File path:
solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
##########
@@ -216,6 +225,9 @@ private void searchWithTimeLimiter(Query query,
ProcessedFilter filter,
Collector collector) throws IOException {
if (queryCommand.getTimeAllowed() > 0 ) {
+ if (collector == null) {
Review comment:
How about changing the caller of this (private) method to not pass
`null` in the first place?
* \+ clearly reflect at caller level that no collecting is intended and to
be done (other than for hit counting purposes)
* -/+ use of no-op and hit-count collector in the `group=true rows=0` edge
case
* \+ no extra null-checks or logic complication for the `group=true rows!=0`
common case
--
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]