Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9046

Fix wrong example in Javadoc of TermInSetQuery

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.x, main (9.0)
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      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

          Activity

            People

            • Assignee:
              danmuzi Namgyu Kim
              Reporter:
              danmuzi Namgyu Kim

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                  Issue deployment