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

SynonymQuery rewrite can change field boost calculation

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • New

    Description

      SynonymQuery accepts a boost per term, which acts as a multiplier on the term frequency in the document. When rewriting a SynonymQuery with a single term, we create a BoostQuery wrapping a TermQuery. This changes the meaning of the boost: it now multiplies the final TermQuery score instead of multiplying the term frequency before it's passed to the score calculation.

      This is a small point, but maybe it's worth avoiding rewriting a single-term SynonymQuery unless the boost is 1.0.

      The same consideration affects CombinedFieldQuery in sandbox.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              julietibs Julie Tibshirani
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 1h
                  1h