You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Namgyu Kim (Jira)" <ji...@apache.org> on 2019/11/13 16:53:00 UTC
[jira] [Created] (LUCENE-9046) Fix wrong example in Javadoc of
TermInSetQuery
Namgyu Kim created LUCENE-9046:
----------------------------------
Summary: Fix wrong example in Javadoc of TermInSetQuery
Key: LUCENE-9046
URL: https://issues.apache.org/jira/browse/LUCENE-9046
Project: Lucene - Core
Issue Type: Improvement
Reporter: Namgyu Kim
Assignee: Namgyu Kim
Fix For: 8.x, master (9.0)
There is a wrong example in Javadoc of TermInSetQuery.
This patch will be merged to the master and 8.x branch.
Before
{code:java}
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);
{code}
After
{code:java}
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);
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org