We have a simple domain where
FirstName_s:"Bob"
returns 40 documents, and
-Department_t:"Ninjas"
returns all of the documents (we don’t have a ninja department).
We expected the query
(FirstName_s:"Bob") OR (-Department_t:"Ninjas")
to return all documents, however it only returned the original 40 documents.
We have experimented with a couple of different orderings, tried using ‘NOT’ instead of ‘-‘ all to no avail.
Is this expected behavior?
Perhaps more importantly, how do we get the behavior we expect?
I stumbled upon https://issues.apache.org/jira/browse/SOLR-2209 so maybe parentheses are causing error. Does this work ?
Does rewritting the query in a way, that it won’t contain OR (using De_Morgan’s law) helping ?