lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn van Groningen (JIRA)" <>
Subject [jira] [Updated] (LUCENE-3099) Grouping module should allow subclasses to set the group key per document
Date Sat, 28 May 2011 21:48:47 GMT


Martijn van Groningen updated LUCENE-3099:

    Attachment: LUCENE-3099.patch

Attached an initial idea of abstracting away the source of the group values.

In the patch there are four concepts:
* GroupValue. An abstraction of a value.
* GroupValueSource. An abstraction of the source of the group value.
* GroupHolder. An abstract holder to get the groups in a efficient manner.
* GroupSpecification. A factory class that glues all the above concepts together.

I think with this infrastructure it is quite straight forward to add the ability to group
by a function. The patch contains implementations for all fields (string, int, double etc.).

Some concepts are look like with what is already in Lucene / Solr. For example Lucene's ValueSource
and DocValues or Solr's DocValues and MutableValue. I just started from scratch to see what
grouping really needs. The Lucene's DocValues for example didn't have all functionality grouping

Furthermore I have added research group collectors. I ported the MatchAllGroupsCollector and
FirstPassGroupingCollector to use this new infrastructure. Just to get a feeling of how it
all fits together.

I also included a simple runner class that runs these research collectors and compares them
to the variants already added to the code base. You can then easily check search times and
the group results. 

> Grouping module should allow subclasses to set the group key per document
> -------------------------------------------------------------------------
>                 Key: LUCENE-3099
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>             Fix For: 3.2, 4.0
>         Attachments: LUCENE-3099.patch
> The new grouping module can only group by a single-valued indexed field.
> But, if we make the 'getGroupKey' a method that a subclass could override, then I think
we could refactor Solr over to the module, because it could do function queries and normal
queries via subclass (I think).
> This also makes the impl more extensible to apps that might have their own interesting
group values per document.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message