public static class MultiTermQuery.ConstantScoreAutoRewrite extends MultiTermQuery.RewriteMethod implements java.io.Serializable
MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE
is used.
Otherwise, MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE
is
used.Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_DOC_COUNT_PERCENT |
static int |
DEFAULT_TERM_COUNT_CUTOFF |
Constructor and Description |
---|
ConstantScoreAutoRewrite() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
double |
getDocCountPercent() |
int |
getTermCountCutoff() |
int |
hashCode() |
Query |
rewrite(IndexReader reader,
MultiTermQuery query) |
void |
setDocCountPercent(double percent)
If the number of documents to be visited in the
postings exceeds this specified percentage of the
maxDoc() for the index, then
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used. |
void |
setTermCountCutoff(int count)
If the number of terms in this query is equal to or
larger than this setting then
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used. |
public static int DEFAULT_TERM_COUNT_CUTOFF
public static double DEFAULT_DOC_COUNT_PERCENT
public void setTermCountCutoff(int count)
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE
is used.public int getTermCountCutoff()
setTermCountCutoff(int)
public void setDocCountPercent(double percent)
MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE
is used.percent
- 0.0 to 100.0public double getDocCountPercent()
setDocCountPercent(double)
public Query rewrite(IndexReader reader, MultiTermQuery query) throws java.io.IOException
rewrite
in class MultiTermQuery.RewriteMethod
java.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.