Class MultiTermQuery.TopTermsScoringBooleanQueryRewrite

Enclosing class:
MultiTermQuery

public static final class MultiTermQuery.TopTermsScoringBooleanQueryRewrite extends TopTermsRewrite<BooleanQuery>
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count. It is the default rewrite method for FuzzyQuery.

See Also:
  • Constructor Details

    • TopTermsScoringBooleanQueryRewrite

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

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