lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: Collect facet only on specific values
Date Thu, 09 May 2013 10:48:06 GMT
I think you can do what Mike suggested quite easily. Create your own
FacetResultsHandler, override the Accumulater.createFRH(). The handler will
zero out all counts you are not interested in and then delegate to the
wrapped FRH to compute the actual top K.

Shai


On Thu, May 9, 2013 at 1:44 PM, Nicola Buso <nbuso@ebi.ac.uk> wrote:

> Hi Mike,
>
> thanks for the reply.
> I was looking also into CountFacetRequest (my specific case); should I
> create a FacetRequest extension that on getValueOf(...) return values >
> 0 only for interesting facet values?
> Did you mean this?
>
>
> Nicola.
>
> On Thu, 2013-05-09 at 06:28 -0400, Michael McCandless wrote:
> > On Thu, May 9, 2013 at 5:53 AM, Nicola Buso <nbuso@ebi.ac.uk> wrote:
> > > Hi,
> > >
> > > I want to hide some values for a facet; than I'm looking into a way to
> > > collect facet values only for a subset of possible values.
> > > Is there a way to obtain this?
> > > If not, extending TopK...Handler (or wrapping it) would be the right
> way
> > > to obtain this behaviour?
> >
> > Hmm so you want the TopK (by facet count), except you want to remove
> > certain values from consideration?
> >
> > If it's not too many values, eg at most N, then you could collect top
> > K+N, and then post-filter?
> >
> > Alternatively, if N is largish, it may be possible to zero out the
> > counts for the facet values you want to exclude, before TopK runs ...
> >
> > Mike McCandless
> >
> > http://blog.mikemccandless.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message