: i want to query documents which match a certain dynamic criteria. : like, How do i get all documents, where sub(field1,field2) < 0 ? : : i tried _val_: sub(field1,field2) and used fq:[_val_:[0 TO *]
take a look at the frange QParser... https://lucene.apache.org/solr/4_3_0/solr-core/org/apache/solr/search/FunctionRangeQParserPlugin.html fq={!frange l=0}sub(field1,field2) I've updated the wiki to draw more attention to this usage... https://wiki.apache.org/solr/FunctionQuery#Using_FunctionQuery -Hoss