Doing a range search is straightforward. I have a fixed value in a document
field, I search on [x TO y] and if the fixed value is in the range requested
it gets a hit. But, what if I have data in a document where there is a min
value and a max value and my query is a fixed value and I want to get a hit
if the query value is in that range. For example:

Solr Doc1:
field  min_price:100
field  max_price:500

Solr Doc2:
field  min_price:300
field  max_price:500

and my query is price:250. I could create a query of (min_price:[* TO 250]
AND max_price:[250 TO *]) and that should work. It should find only doc 1.
However, if I have several fields like this and complex queries that include
most of those fields, it becomes a very ugly query. Ideally I'd like to do
something similar to what the spatial contrib guys do where they make
lat/long a single point. If I had a min/max field, I could call it Price
(100, 500) or Price (300,500) and just do a query of  Price:250 and Solr
would see if 250 was in the appropriate range.

Looong question short...Is there something out there already that does this?
Does anyone else do something like this and have some suggestions?
Thanks,
Ken
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Reverse-range-search-tp1789135p1789135.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to