Search code examples
solrluceneintervalsfacet

Facet pivot on interval.facet field in addition to another field


I have this query (date is stored as ISO string): q=*:*&facet.mincount=1&rows=0&facet.interval=date&f.date.facet.interval.set=[2017-01-01,2017-12-31]&f.date.facet.interval.set=[2018-01-01,2018-12-31]&facet.pivot=category&rows=0&facet.limit=1000

I would like to "double pivot" the facet.interval as well as another field category. I have tried using local parameter reference to no avail, e.g.: q=*:*&facet.mincount=1&rows=0&facet.interval={!tag=d}date&f.date.facet.interval.set=[2017-01-01,2017-12-31]&f.date.facet.interval.set=[2018-01-01,2018-12-31]&facet.pivot={!tag=d}category&rows=0&facet.limit=1000

That returns the same data.

How can I connect these two "groupings" to get pivots of pivots?


Solution

  • I ended up using facet.query and facet.pivot as described by this documentation: https://lucene.apache.org/solr/guide/6_6/faceting.html#Faceting-Thefacet.interval.setparameter