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

Otis Gospodnetic commented on LUCENE-3122:
------------------------------------------

Is this about grouping or about faceting (a la Solr pivot faceting?)


> Cascaded grouping
> -----------------
>
>                 Key: LUCENE-3122
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3122
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/grouping
>            Reporter: Michael McCandless
>              Labels: gsoc2014
>             Fix For: 4.8
>
>
> Similar to SOLR-2526, in that you are grouping on 2 separate fields, but 
> instead of treating those fields as a single grouping by a compound key, this 
> change would let you first group on key1 for the primary groups and then 
> secondarily on key2 within the primary groups.
> Ie, the result you get back would have groups A, B, C (grouped by key1) but 
> then the documents within group A would be grouped by key 2.
> I think this will be important for apps whose documents are the product of 
> denormalizing, ie where the Lucene document is really a sub-document of a 
> different identifier field.  Borrowing an example from LUCENE-3097, you have 
> doctors but each doctor may have multiple offices (addresses) where they 
> practice and so you index doctor X address as your lucene documents.  In this 
> case, your "identifier" field (that which "counts" for facets, and should be 
> "grouped" for presentation) is doctorid.  When you offer users search over 
> this index, you'd likely want to 1) group by distance (ie, < 0.1 miles, < 0.2 
> miles, etc., as a function query), but 2) also group by doctorid, ie cascaded 
> grouping.
> I suspect this would be easier to implement than it sounds: the per-group 
> collector used by the 2nd pass grouping collector for key1's grouping just 
> needs to be another grouping collector.  Spookily, though, that collection 
> would also have to be 2-pass, so it could get tricky since grouping is sort 
> of recursing on itself.... once we have LUCENE-3112, though, that should 
> enable efficient single pass grouping by the identifier (doctorid).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to