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

Yonik Seeley commented on SOLR-4164:
------------------------------------

bq. I am certain that in Solr 4.10 non-cloud specifying -1 did roll up all 
matching documents.

Yep, I remember group.limit=-1 being explicitly supported when the feature was 
implemented.

bq. IIUC though, what Dat has found is that even in single node solr, 
group.limit=-1 doesn't give you "unlimited" groupping results – it silently 
re-writes the effective groupedDocsToCollect value to '1' 

Look at the code for getMax()... it does map -1 to the max possible.

bq.  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

There's an argument against unlimited behavior *by default*.  But if one asks 
for everything back, one should get it.  "-1" is a common way to ask for 
this... facets, the term component, and graph expressions all use "-1" as 
unlimited.

The alternative is to pick a really high number out of a hat... which is more 
fragile since it may silently break applications in the future when they grow 
beyond that arbitrary number if it's not large enough (they will stop getting 
all the data, and that may not be an obvious error).






> 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