Being new to Lucene I'd like to find documents where a certain field is either within a given range or entirely absent. That is I'd like to combine the results of these two queries:
q=something AND field:[lower TO upper]
q=something AND -field:[* TO *]
Either query gives me the desired result but when I try to combine the two I get nothing:
q=something AND (field:[lower TO upper] OR -field:[* TO *])
something
can be a more complex query. Actually, my query will be Solr query from within a Java program in case it makes a difference. How can this be done?