I'm trying to do a functional query with an OR/AND however it seems there are limitations in doing so. Here is the logic for the SQL equivalent of the query I'm trying to perform:
ABS(col1-:val1)<1 OR (col1 IS NULL AND ABS(col2-:val1)<1)
Here is my current working fq query to grab the the documents with an ABS difference of <1.
fq={!frange l=0 u=1}abs(sub(col1,val1))
Here is what I'm trying to execute but can't without error
fq={!frange l=0 u=1}abs(sub(col1,val1)) OR (-col1:[* TO *] AND {!frange l=0 u=1}abs(sub(col2,val1)))
It seems like it's not possible to use and AND or and OR in the same fq when using a functional query. How would I go about doing this? I am using solr 4.1. Thanks