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

CommonTermsQuery HighFreq MUST not applied if lowFreq terms

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 4.8.1
    • None
    • core/query/scoring
    • None
    • New, Patch Available

    Description

      When a CommonTermsQuery has high and low frequency terms, the highFreq terms Boolean query is always added as a SHOULD clause, even if highFreqOccur is set to MUST:

      new CommonTermsQuery(Occur.MUST, Occur.MUST,0.1);

      My patch sets the top level Boolean query's minimum should match to 1 to ensure that the SHOULD clause must match. Not sure if this is the correct approach, or if it should just add the highFreq query as a MUST clause instead?

      Attachments

        1. common_terms.patch
          3 kB
          Clinton Gormley

        Activity

          People

            simonw Simon Willnauer
            clintongormley Clinton Gormley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: