Hakim
Hakim

Reputation: 3437

Solr - get range facets inferior to a threshold

I'm using Solr 4.3. I have built range facet for field price, for which I gave a f.price.facet.range.start, a f.price.facet.range.end and f.price.facet.range.gap, but I cant figure out how to compute the facet for values inferior or superior to a certain value.

Maybe I dont know the exact syntax : f.price.facet.range.other.before=1000000.

Upvotes: 0

Views: 236

Answers (1)

Paige Cook
Paige Cook

Reputation: 22555

According to the documentation on on Facet Range Other, this will only work for values that fall within the range being computed. So for your example, if 1000000 is not within your current range start/end values, you will not get a result from the range.other.before parameter. However, you can still get the facet for this price, by including it as a separate facet.query request.

For your example, you would include te following parameter:

facet.query=price:[* TO 1000000]

Upvotes: 1

Related Questions