The double negatives are a byproduct of my code building the query, as
the user has several fields to choose from etc, it is not done on
purpose.
With luke I was able to see that:
+body:memo 1 hit
+body:memo -body:policy 0
+body:memo -(-body:policy) 1
+body:memo +(-body:policy) 0
In the last two c
I'm not sure I understand the purpose of the double negatives.
Also, a boolean query must have some non-prohibited clauses to match
anything (and mydocs in your code example violates this).
Is the following what you are trying to do?
BooleanQuery mbq = new BooleanQuery();
TermQuery mydocs = body:
Hi,
If I run a query like this:
-(-body:angel) -(-body:darpa)
I get 0 hits. As I did not find any thread about that case, I though
ANDing with a MatchAllDocsQuery would return my desired set (all docs
excepting the ones with angel or darpa).
So more I do the following:
BooleanQuery mbq = new Bool