public static class MultiTermQuery.ConstantScoreAutoRewrite extends MultiTermQuery.RewriteMethod
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(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 IOException
rewrite in class MultiTermQuery.RewriteMethodIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved