Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

Enclosing class:
MultiTermQuery

public static final class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite extends TopTermsRewrite<BooleanQuery.Builder>
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.

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

  • Constructor Details

    • TopTermsBoostOnlyBooleanQueryRewrite

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

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

  • Method Details