Hello Solr Gurus,

Sorry to bother you again on this. Is there no way in Solr to filter pivot
facets?
[Or did I attract the wrath of the group by posting the question first on
StackOverflow? :-)]

Thanks once again.

On Mon, Dec 18, 2017 at 10:59 AM, Arun Rangarajan <arunrangara...@gmail.com>
wrote:

> Solr version: 6.6.0
>
> There are two multi-valued string fields in my schema:
> * interests
> * hierarchy.
>
> Goal is to run a pivot facet query on both these fields, but only for
> specific values of `interests` field. This query:
>
> ```
> /select
> ?wt=json
> &rows=0
> &q=interests:(hockey OR soccer)
> &facet=true
> &facet.pivot=interests,hierarchy
> ```
>
> selects the correct documents, but since `interests` is a multi-valued
> field, it gives the required counts for the interested values (hockey,
> soccer), but also gives the counts for other values of `interests` in the
> matching documents.
>
> How to filter the pivot facet counts only for the values of `interests`
> field specified in the 'q' param i.e. hockey and soccer in the example.
> Essentially, is there an equivalent of https://lucene.apache.org/
> solr/guide/6_6/faceting.html#Faceting-Limitingfacetwithcertainterms for
> pivot facet query? Or are there alternate formats like JSON faceting that
> may help here?
>
> (Full disclosure: I asked the question on StackOverflow and got no
> response so far: https://stackoverflow.com/questions/47838619/
> filtering-solr-pivot-facet-values )
>
> Thanks.
>

Reply via email to