Try

        BooleanQuery.Builder builder = new BooleanQuery.Builder();
        builder.add(subQuery1, occur1);
        builder.add(subQuery2, occur2);
        // ...
        BooleanQuery query = builder.build();



-----Urspr√ľngliche Nachricht-----
Von: szzoli [mailto:reg9sz...@freemail.hu] 
Gesendet: Mittwoch, 21. September 2016 13:10
An: java-user@lucene.apache.org
Betreff: Re: How to build a Lucene BooleanQuery?

Thank you.

This is almost the solution, but how can I build a BoolesanQuery?
The
BooleanQuery categoryQuery = new BooleanQuery(); does not exist, the 
builder.createBooleanQuery(field, queryString); creats a TermQuery.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-build-a-Lucene-BooleanQuery-tp4297102p4297106.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to