lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: AW: Use function return value for range queries
Date Fri, 04 Oct 2013 15:02:10 GMT
No plan that I know of, but there is a new Lucene "expression module", so 
maybe it is not so farfetched. Its performance might not be so great, but if 
you need the flexibility it might be worth it.

-- Jack Krupansky

-----Original Message----- 
From: Sandro Zbinden
Sent: Friday, October 04, 2013 10:53 AM
Subject: AW: Use function return value for range queries

Thanks for the quick answer.  I thought that :-)

Is there any plan add such a functionality in the future. Or is it 
completely against the concept.

Bests Sandro

-----Urspr√ľngliche Nachricht-----
Von: Jack Krupansky []
Gesendet: Freitag, 4. Oktober 2013 16:41
Betreff: Re: Use function return value for range queries

I think the best you can do is compute sum(pricea,priceb) at index time as a 
third field, say priceSum, and then you can do a range query on that 
priceSum field.

It would be nice to be able to have a query that evaluates arbitrary 
expressions combining field values, but there is no such feature in Lucene 
at this time. FunctionQuery modifies the document score, but doesn't affect 
which documents are selected.

Function queries can be used to modify document scores and to return values, 
but not in the query itself to select documents.

-- Jack Krupansky

-----Original Message-----
From: SandroZbinden
Sent: Friday, October 04, 2013 10:21 AM
Subject: Use function return value for range queries

Is there a way to use the function return value for a range query

For example: I have two price fields pricea and priceb and now i want to get 
the values where the sum of the pricea and priceb is between  [0 TO 5]

Something like *select?q={!func}sum(pricea,priceb):[0 TO 5]*

I can't calculate this at index time.

Bests Sandro

View this message in context:
Sent from the Solr - User mailing list archive at 

View raw message