lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby Lazar <tla...@capitaltg.com>
Subject Re: Facet field query on subset of documents
Date Fri, 20 Dec 2013 20:47:37 GMT
Luis (or anyone else),

Did you ever find a solution for this problem?  If not, is querying twice
the way to go?  I'm looking to do the same with no luck yet.

Thanks,

Toby

*******************************
  Toby Lazar
  Capital Technology Group
  Email: tlazar@capitaltg.com
  Mobile: 646-469-5865
*******************************


On Thu, Nov 21, 2013 at 5:44 PM, Luis Lebolo <luis.lebolo@gmail.com> wrote:

> Hi Erick,
>
> Thanks for the reply and sorry, my fault, wasn't clear enough. I was
> wondering if there was a way to remove terms that would always be zero
> (because the term came from a document that didn't match the filter query).
>
> Here's an example. I have a bunch of documents with fields 'manufacturer'
> and 'location'. If I set my filter query to "manufacturer = Sony" and all
> Sony documents had a value of 'Florida' for location, then I want 'Florida'
> NOT to show up in my facet field results. Instead, it shows up with a count
> of zero (and it'll always be zero because of my filter query).
>
> Using mincount = 1 doesn't solve my problem because I don't want it to hide
> zeroes that came from documents that actually pass my filter query.
>
> Does that make more sense?
>
>
> On Thu, Nov 21, 2013 at 4:36 PM, Erick Erickson <erickerickson@gmail.com
> >wrote:
>
> > That's what faceting does. The facets are only tabulated
> > for documents that satisfy they query, including all of
> > the filter queries and anh other criteria.
> >
> > Otherwise, facet counts would be the same no matter
> > what the query was.
> >
> > Or I'm completely misunderstanding your question...
> >
> > Best,
> > Erick
> >
> >
> > On Thu, Nov 21, 2013 at 4:22 PM, Luis Lebolo <luis.lebolo@gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > Is it possible to perform a facet field query on a subset of documents
> > (the
> > > subset being defined via a filter query for instance)?
> > >
> > > I understand that facet pivoting might work, but it would require that
> > the
> > > subset be defined by some field hierarchy, e.g. manufacturer -> price
> > (then
> > > only look at the results for the manufacturer I'm interested in).
> > >
> > > What if I wanted to define a more complex subset (where the name starts
> > > with A but ends with Z and some other field is greater than 5 and yet
> > > another field is not 'x', etc.)?
> > >
> > > Ideally I would then define a "facet field constraining query" to
> include
> > > only terms from documents that pass this query.
> > >
> > > Thanks,
> > > Luis
> > >
> >
>

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