Search code examples
solrintervalsfacet

Solr facet interval


I have a solr 4.50 installation and want to show a interval facet. I read the docs here:

https://wiki.apache.org/solr/SimpleFacetParameters#Interval_Faceting

and added exactly the same field, "price". I can get all sorts of faceting, except interval:

...&facet=true&facet.interval=price&f.price.facet.interval.set=(10,100]

Yet, I don't get anything related to intervals:

  "facet_counts": {
    "facet_queries": {},
    "facet_fields": {},
    "facet_dates": {},
    "facet_ranges": {}
  }

Also, except the above documentation link, I didn't find anything related to interval faceting.

Can somebody give me a working example?


Solution

  • Not sure if you still have this concern however the interval faceting can only be used on the fields for which you have enabled docValues = true in your schema.xml. Price not being one hence it dint render any intervals for the same.

    Let me know if that helps.

    Also to check the Interval Faceting kindly check the link below :

    https://cwiki.apache.org/confluence/display/solr/Faceting

    Thanks, Ati