: Because the value of the function will be treated as a relevance value
: and relevance value of 0 (and less?) will cause the record to be
: filtered out.

I don't believe that's true? ... IIRC 'fq' doesn't care what the scores 
are as long as the query is a "match" and a 'func' query will match as 
long as the function says it matches ... something like sub() should be a 
match as long sa both fields exist in the document.

Pretty sure the simplest version of what you want is 
'fq={!func}gt(value,cost)' .. of if you need more complex functions/rules 
you can use the 'frange' QParser to only match documents where the result 
of an equation is in a specific range of values...

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-FunctionRangeQueryParser

: On 1 June 2017 at 13:46, Mikhail Ibraheem
: <mikhail.ibrah...@yahoo.com.invalid> wrote:
: > Hi,I have 2 fields "cost" and "value" at my records. I want to get all 
documents that have "value" greater than "cost". Something likeq=value:[cost TO 
*]
: > Please advise.
: > Thanks
: 

-Hoss
http://www.lucidworks.com/

Reply via email to