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

Fix wrong example in Javadoc of TermInSetQuery

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.x, master (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

          Issue Links

            Activity

              People

              • Assignee:
                danmuzi Namgyu Kim
                Reporter:
                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