[
https://issues.apache.org/jira/browse/LUCENE-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209594#comment-13209594
]
Michael McCandless commented on LUCENE-3778:
--------------------------------------------
{quote}
bq. Would you also handle block (single pass) grouping with the same class...?
I think we can do this. The block grouping returns TopGroups as result.
{quote}
Nice.
{quote}
bq. I guess you'd then .getAllGroups(), .getAllGroupHeads() after .search(...)?
Yes, we need that. In the case of getAllGroups() the TopGroups#totalGroupCount
field can be used when the user is only interested in the number of matching
groups.
{quote}
OK.
{quote}
bq. Hmm would we try to handle Term/BytesRef and Function/MutableValue with the
same class?
With generics?
{quote}
I think so... but I think it may get tricky. Like, I think you should
specify up front (to GroupingSearch ctor) the required things about
your request (block join OR group field OR field + DV type OR function
VS/ctx map), setters for the numerous optional things (sort,
groupSort, getScores, getMaxScores, maxDocsPerGroup) and maybe params
to search for the per-requesty things (topNGroups, groupOffset,
withinGroupOffset).
But then the <T> will depend on which ctor you used...? Not sure how
it'd work...
bq. Maybe distributed grouping needs its own class? Since the usage is
different from a non distributed grouping.
Yeah...
Maybe we can do this for join module too!
> Create a grouping convenience class
> -----------------------------------
>
> Key: LUCENE-3778
> URL: https://issues.apache.org/jira/browse/LUCENE-3778
> Project: Lucene - Java
> Issue Type: Improvement
> Components: modules/grouping
> Reporter: Martijn van Groningen
>
> Currently the grouping module has many collector classes with a lot of
> different options per class. I think it would be a good idea to have a
> GroupUtil (Or another name?) convenience class. I think this could be a
> builder, because of the many options
> (sort,sortWithinGroup,groupOffset,groupCount and more) and implementations
> (term/dv/function) grouping has.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]