Package org.apache.lucene.search
Class TopTermsRewrite<Q extends Query>
- java.lang.Object
-
- org.apache.lucene.search.MultiTermQuery.RewriteMethod
-
- org.apache.lucene.search.TopTermsRewrite<Q>
-
- Direct Known Subclasses:
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
,MultiTermQuery.TopTermsScoringBooleanQueryRewrite
public abstract class TopTermsRewrite<Q extends Query> extends MultiTermQuery.RewriteMethod
Base rewrite method for collecting only the top terms via a priority queue.
-
-
Constructor Summary
Constructors Constructor Description TopTermsRewrite(int size)
Create a TopTermsBooleanQueryRewrite for at mostsize
terms.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getSize()
return the maximum priority queue sizeint
hashCode()
Q
rewrite(IndexReader reader, MultiTermQuery query)
-
-
-
Constructor Detail
-
TopTermsRewrite
public TopTermsRewrite(int size)
Create a TopTermsBooleanQueryRewrite for at mostsize
terms.NOTE: if
BooleanQuery.getMaxClauseCount()
is smaller thansize
, then it will be used instead.
-
-
Method Detail
-
getSize
public int getSize()
return the maximum priority queue size
-
rewrite
public final Q rewrite(IndexReader reader, MultiTermQuery query) throws java.io.IOException
- Specified by:
rewrite
in classMultiTermQuery.RewriteMethod
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-