You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/05/28 22:27:20 UTC

[jira] [Commented] (LUCENE-5022) Add FacetResult.mergeHierarchies

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

Michael McCandless commented on LUCENE-5022:
--------------------------------------------

This looks great Shai!  Can it be used for non-hierarchical dims as well?  E.g. if I have one FacetRequest for top 10 under User/ and then a second FacetRequest for User/Bob (a "leaf" ... hmm can one make a FacetRequest like that?), will it merge them?

Or, what would it do if I (oddly) had one FacetRequest asking for top 10 under User/ and another FacetRequest asking for top 20 under User/?
                
> Add FacetResult.mergeHierarchies
> --------------------------------
>
>                 Key: LUCENE-5022
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5022
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-5022.patch
>
>
> When you DrillSideways on a hierarchical dimension, and especially when you OR multiple drill-downs together, you get several FacetResults back, one for each category you drill down on. So for example, if you want to drill-down on Date/2010 OR Date/2011/May, the FacetRequests that you need to create (to get the sideways effect) are: Date/, Date/2010, Date/2011 and Date/2011/May. Date/ is because you want to get sideways counts as an alternative to Date/2010, and Date/2011 in order to get months count as an alternative to Date/2011/May.
> That results in 4 FacetResult objects. Having a utility which merges all FacetResults of the same dimension into a single hierarchical one will be very useful for e.g. apps that want to display the hierarchy. I'm thinking of FacetResult.mergeHierarchies which takes a List<FacetResult> and returns the merged ones, one FacetResult per dimension.

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