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

Fix wrong example in Javadoc of TermInSetQuery

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.x, 9.0
    • None
    • None
    • 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

        Issue Links

          Activity

            People

              danmuzi Namgyu Kim
              danmuzi Namgyu Kim
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              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