Reputation: 12517
I am using solr and I want to setup two different types of facets on my data. The first is date, so I would like it like this:
Posted: Today 3 days 7 days All time
Distance: 5 miles 10 miles 30 miles 100 miles
How should I be setting up faceting? It looks like something I need to edit my solr.xml or my schema.xml but it is all very confusing and the help documents boggle my mind.
Can someone who has done this before give me a bit of guidance please?
Upvotes: 1
Views: 153
Reputation: 23098
facet.query
: This parameter can be specified multiple times to indicate that multiple queries should be used as separate facet constraints. So you can do distance:[* TO 5]
, distance:[5 TO 10]
and you will get the individual counts.
Then there is facet.date
and facet.range
which may better suit you.
Upvotes: 1