We are trying to use fq parameter to limit our result set. We specify the fq in the solrconfig.xml file within a DisMax <requestHandler>
<requestHandler name="/dismax1" class="solr.DisMaxRequestHandler" > ... <lst name="appends"> <str name="fq">storeAvailableDate:[* TO NOW]</str> <str name="fq">storeExpirationDate:[NOW TO *]</str> </lst> </requestHandler> This works perfectly. Only trouble is that the two data fields may actually be empty, in which case this filters out such records and we want to include them. I've been unable to figure out how to do this. We've tried: <lst name="appends"> <str name="fq">storeAvailableDate:[* TO NOW] OR - storeAvailableDate:[* TO *] </str> <str name="fq">storeExpirationDate:[NOW TO *] OR - storeExpirationDate:[* TO *]</str> </lst> Which is what I'd imagine should work based on http://wiki.apache.org/solr/SolrQuerySyntax and http://lucene.apache.org/java/docs/queryparsersyntax.html but no dice. Is the "OR" even allowed in this place? And also, as a long shot: <lst name="appends"> <str name="fq">storeAvailableDate([* TO NOW] OR -[* TO *])</str> <str name="fq">storeExpirationDate:([NOW TO *] OR -[* TO *])</str> </lst> And, no surprise, that didn't work. But I don't understand why the first thing we tried didn't work. Any help? Thanks, Ezra E.