Description
There is a wrong example in Javadoc of TermInSetQuery.
This patch will be merged to the master and 8.x branch.
Before
Query q1 = new TermInSetQuery(new Term("field", "foo"), new Term("field", "bar")); BooleanQuery bq = new BooleanQuery(); bq.add(new TermQuery(new Term("field", "foo")), Occur.SHOULD); bq.add(new TermQuery(new Term("field", "bar")), Occur.SHOULD); Query q2 = new ConstantScoreQuery(bq);
After
Query q1 = new TermInSetQuery("field", new BytesRef("foo"), new BytesRef("bar")); BooleanQuery bq = new BooleanQuery(); bq.add(new TermQuery(new Term("field", "foo")), Occur.SHOULD); bq.add(new TermQuery(new Term("field", "bar")), Occur.SHOULD); Query q2 = new ConstantScoreQuery(bq);
Attachments
Issue Links
- links to