Hi,

my documents (products) have a price field, and I want to have
a "dynamically" calculated range facet for that in the response.

E.g. I want to have this in the response
price:[* TO 20]  -> 23
price:[20 TO 40] -> 42
price:[40 TO *]  -> 33
if prices are between 0 and 60
but
price:[* TO 100]   -> 23
price:[100 TO 200] -> 42
price:[200 TO *]   -> 33
if prices are between 0 and 300

AFAICS I do not have the possibility to specify range queries in my
application, as I do not have a clue what's the lowest and highest
price in the search result and what are "good" ranges according
to the (statistical) distribution of prices in the search result.

So if it would be possible to go over each item in the search result
I could check the price field and define my ranges for the specific
query on solr side and return the price ranges as a facet.

Has anybody done s.th. like this before, or is there s.th. that I'm
missing and why this approach does not make sense at all?

Otherwise, what would be a good starting point to plug in such
functionality into solr?

Thanx a lot in advance,
cheers,
Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to