lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Rangarajan <arunrangara...@gmail.com>
Subject Filtering Solr pivot facet values
Date Mon, 18 Dec 2017 18:59:10 GMT
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.

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