Lance,
I think you are right. I met the same problem before.
> -(collection:pile1 OR collection:pile2)
Solr can process the query which has NOT operator ("-") in the head.
If Solr find it, Solr adds MatchAllDocsQuery automatically
in the front of that query as follows:
MatchAllDocsQuery -(collection:pile1 OR collection:pile2)
Then Lucene can process this query properly.
However, Solr doesn't add MatchAllDocsQuery if the query doesn't
have NOT operator in the head.
To avoid this problem, you can add "*:*" at the front of your query:
(*:* -collection:pile1 AND -collection:pile2)
(*:* -collection:pile1 OR -collection:pile2)
Thank you,
Koji
Lance Lance wrote:
Are there any known bugs in the syntax parser? We're using lucene-2.2.0 and
Solr 1.2.
We have documents with searchable text and a field 'collection'.
This query works as expected, finding everything except for collections
'pile1' and 'pile2'.
text -(collection:pile1 OR collection:pile2)
When we apply De Morgan's Law, we get 0 records:
text (-collection:pile1 AND -collection:pile2)
This should return all records, but it returns nothing:
text (-collection:pile1 OR -collection:pile2)
Thanks,
Lance