Hi
I recently found TermInSetQuery example at
https://lucene.apache.org/core/9_7_0/core/org/apache/lucene/search/TermInSetQuery.html
but if I understand correctly one should use now BooleanQuery.Builder
instead BooleanQuery itself, right?
BooleanQuery.Builder bqb = new BooleanQuery.Builder();
bqb.add(new TermQuery(new Term("field", "foo")),
BooleanClause.Occcur.SHOULD);
bqb.add(new TermQuery(new Term("field", "bar")),
BooleanClause.Occcur.SHOULD);
Query q2 = new ConstantScoreQuery(bqb.build());
If so, I would be happy to do a minor pull request or feel free to
update it directly.
Thanks
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
I recently found TermInSetQuery example at
https://lucene.apache.org/core/9_7_0/core/org/apache/lucene/search/TermInSetQuery.html
but if I understand correctly one should use now BooleanQuery.Builder
instead BooleanQuery itself, right?
BooleanQuery.Builder bqb = new BooleanQuery.Builder();
bqb.add(new TermQuery(new Term("field", "foo")),
BooleanClause.Occcur.SHOULD);
bqb.add(new TermQuery(new Term("field", "bar")),
BooleanClause.Occcur.SHOULD);
Query q2 = new ConstantScoreQuery(bqb.build());
If so, I would be happy to do a minor pull request or feel free to
update it directly.
Thanks
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org