Class MultiTermQuery.TopTermsBlendedFreqScoringRewrite

Enclosing class:
MultiTermQuery

public static final class MultiTermQuery.TopTermsBlendedFreqScoringRewrite extends TopTermsRewrite<BlendedTermQuery.Builder>
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but adjusts the frequencies used for scoring to be blended across the terms, otherwise the rarest term typically ranks highest (often not useful eg in the set of expanded terms in a FuzzyQuery).

This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.

  • Constructor Details

    • TopTermsBlendedFreqScoringRewrite

      public TopTermsBlendedFreqScoringRewrite(int size)
      Create a TopTermsBlendedScoringBooleanQueryRewrite for at most size terms.

      NOTE: if IndexSearcher.getMaxClauseCount() is smaller than size, then it will be used instead.

  • Method Details