Thank you.

I solved the problem so:

BooleanQuery.Builder builder = new BooleanQuery.Builder(); 
TermQuery subQuery1 = new TermQuery(new Term(field, queryString1));
TermQuery subQuery2 = new TermQuery(new Term(field, queryString2));
builder.add(subQuery1, BooleanClause.Occur.MUST); 
builder.add(subQuery2, BooleanClause.Occur.MUST_NOT); 
BooleanQuery bq =; 

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to