[ 
https://issues.apache.org/jira/browse/SOLR-4164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15543822#comment-15543822
 ] 

Hoss Man commented on SOLR-4164:
--------------------------------

bq. I am certain that in Solr 4.10 non-cloud specifying -1 did roll up all 
matching documents. We certainly had more than 1 in the group.

Ok .. weird.  

I see now I missread what Dat was saying ... in single node more {{getMax}} is 
returning maxDoc if docsPerGroup < 0 ... so that's where that unlimited 
behavior was coming from.

In general this smells like a very bad idea to me ... i'm really 
suprised/scared  {{group.limit=-1}} has ever worked this way, because it would 
make it very easy to crash solr/clients depending on what how many docs are in 
each group being returned -- this is the precise reason {{rows=-1}} has never 
been supported for non-grouping searches.

In any case, since we can't support the same "unlimited" behavior in cloud 
mode, let's absolutely add a clear error message indicating that {{group.limit 
< 1}} is the problem.


> Result Grouping fails if no hits
> --------------------------------
>
>                 Key: SOLR-4164
>                 URL: https://issues.apache.org/jira/browse/SOLR-4164
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other, SolrCloud
>    Affects Versions: 4.0
>            Reporter: Lance Norskog
>            Assignee: Cao Manh Dat
>
> In SolrCloud, found a result grouping bug in the 4.0 release.
> A distributed result grouping request under SolrCloud got this result:
> {noformat}
> Dec 10, 2012 10:32:07 PM org.apache.solr.common.SolrException log
> SEVERE: null:java.lang.IllegalArgumentException: numHits must be > 0; please 
> use TotalHitCountCollector if you just need the total hit count
>         at 
> org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:1120)
>         at 
> org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:1069)
>         at 
> org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.<init>(AbstractSecondPassGroupingCollector.java:75)
>         at 
> org.apache.lucene.search.grouping.term.TermSecondPassGroupingCollector.<init>(TermSecondPassGroupingCollector.java:49)
>         at 
> org.apache.solr.search.grouping.distributed.command.TopGroupsFieldCommand.create(TopGroupsFieldCommand.java:128)
>         at 
> org.apache.solr.search.grouping.CommandHandler.execute(CommandHandler.java:132)
>         at 
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:339)
>         at 
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to