Package org.apache.lucene.search
Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
- java.lang.Object
-
- org.apache.lucene.search.MultiTermQuery.RewriteMethod
-
- org.apache.lucene.search.TopTermsRewrite<BooleanQuery>
-
- org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
-
- Enclosing class:
- MultiTermQuery
public static final class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite extends TopTermsRewrite<BooleanQuery>
A rewrite method that first translates each term intoBooleanClause.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 Summary
Constructors Constructor Description TopTermsBoostOnlyBooleanQueryRewrite(int size)
Create a TopTermsBoostOnlyBooleanQueryRewrite for at mostsize
terms.
-
Method Summary
-
Methods inherited from class org.apache.lucene.search.TopTermsRewrite
equals, getSize, hashCode, rewrite
-
-
-
-
Constructor Detail
-
TopTermsBoostOnlyBooleanQueryRewrite
public TopTermsBoostOnlyBooleanQueryRewrite(int size)
Create a TopTermsBoostOnlyBooleanQueryRewrite for at mostsize
terms.NOTE: if
BooleanQuery.getMaxClauseCount()
is smaller thansize
, then it will be used instead.
-
-