lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Nithian (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4310) If groups.ngroups is specified, the docList's numFound should be the number of groups
Date Fri, 01 Mar 2013 00:39:13 GMT

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

Amit Nithian commented on SOLR-4310:
------------------------------------

Thanks! I'll take a look through this.. I will add some tests to see if I can test for this.
Right now I know that the test I added breaks with my patch and passes if I remove the patch.
Hitting the debugger I can see why but just trying to make sure I understand the paths before
changing something.
                
> If groups.ngroups is specified, the docList's numFound should be the number of groups
> -------------------------------------------------------------------------------------
>
>                 Key: SOLR-4310
>                 URL: https://issues.apache.org/jira/browse/SOLR-4310
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 4.1
>            Reporter: Amit Nithian
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 4.2
>
>         Attachments: SOLR-4310_2.patch, SOLR-4310.patch
>
>
> If you group by a field, the response may look like this:
> <lst name="grouped">
> <lst name="series">
> <int name="matches">138</int>
> <int name="ngroups">1</int>
> <result name="doclist" numFound="138" start="0">
> <doc>
> <int name="id">267038365</int>
> <str name="name">
> Larry's Grand Ole Garage Country Dance - Pure Country
> </str>
> </doc>
> </result>
> </lst>
> </lst>
> and if you specify group.main then the doclist becomes the result and you lose all context
of the number of groups. If you want to keep your response format backwards compatible with
clients (i.e. clients who don't know about the grouped format), setting group.main=true solves
this BUT the numFound is the number of raw matches instead of the number of groups. This may
have downstream consequences.
> I'd like to propose that if the user specifies ngroups=true then when creating the returning
DocSlice, set the numFound to be the number of groups instead of the number of raw matches
to keep the response consistent with what the user would expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message