lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Query formulation help
Date Wed, 26 Oct 2016 15:28:57 GMT
On 10/26/2016 9:00 AM, Prasanna S. Dhakephalkar wrote:
> Hi, Thanks for reply, I did "q": "cost:[20000 TO (20000+5000)]"

Solr doesn't support doing math in that way in a query, except with
dates.  It's invalid syntax for a range query.  Tom's reply was correct,
but was phrased in a way that makes a potential promise that Solr won't

There might be a way to somehow use function query to do it, but if it's
possible, I do not know how to write it.  If it's even possible, the
syntax probably would not be straightforward.

The way I would do your query is to have my code do the calculation and
use 25000 directly instead of 20000+5000.


View raw message