Hi Nicola, Regarding the OR drill-down, yes you can construct your own BooleanQuery, passing Occur.SHOULD instead of MUST. Currently DrillDown does not help you do that, so you can copy the code from DrillDown.query and change SHOULD to MUST. I opened LUCENE-4716 to add this support to DrillDown.
Not sure that I understand your second question. If you want to retrieve counts for all descendants of A, then set your FR.setNumResults to Integer.MAX_VALUE. But note, it's going to be costly, i.e. you'd get a FacetResultNode per child of A, so depending how "wide" A is, this may have some impact on RAM consumption. If that's not what you meant, could you please clarify? Shai On Thu, Jan 24, 2013 at 7:22 PM, Nicola Buso <nb...@ebi.ac.uk> wrote: > Hi all, > > I'm introducing Lucene faceted search in our project and I need some > hints to achieve some functionalities: > - I want facet filtering in OR, how to? > - obtain facets for the filtered results but also for the non filtered > one. i.e. I have facet A with values A/V1, A/V2, A/V3 and these values > are disjunct each other, than a document having field with value V1 > can't have also value V2 and so on; I would like to let the user select > more of these facet values in OR; how can I accumulate all the facets > values also filtering by facet selection? Should it work in a way > similar to ComplementCountingAggregator? > - Can I use DrillDown class to obtain the OR facet filtering or have I > to rewrite a similar class using the BooleanQuery in OR. It's not clear > to me by this comment in the API: > Wraps a given Query as a drill-down query over the given categories, > assuming all are required (e.g. AND). You can construct a query with > different modes (such as OR or AND of ORs) by creating a BooleanQuery > and call this method several times. Make sure to wrap the query in that > case by ConstantScoreQuery and set the boost to 0.0f, so that it doesn't > affect scoring. > > > Do you have any examples doing this? > > Regards > > Nicola. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >