I guess you're confusing it with MUST (MUST_NOT) logic. Try creating
the query you want to exclude without MUST_NOT and add it to the
BooleanQuery with MUST_NOT. That sounds very confusing.
For example
BooleanQuery bq = new BooleanQuery();
TermQuery tqwanted = new TermQuery(new Term("field1: lo
Hi,
I have a problem when using BooleanQuery with NOT-Operators.
When I want to search my documents for elements where a special field is NOT a
special value AND another field is a special value, I do the following in my
code:
Query query1 = ...; // -field1:value1
Query query2=...; // field2: