public class ExtendedCommonTermsQuery
extends org.apache.lucene.queries.CommonTermsQuery
CommonTermsQuery that allows to pass in a
minimumNumberShouldMatch specification that uses the actual num of high frequent terms
to calculate the minimum matching terms.| Constructor and Description |
|---|
ExtendedCommonTermsQuery(org.apache.lucene.search.BooleanClause.Occur highFreqOccur,
org.apache.lucene.search.BooleanClause.Occur lowFreqOccur,
float maxTermFrequency,
boolean disableCoord,
MappedFieldType fieldType) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calcHighFreqMinimumNumberShouldMatch(int numOptional) |
protected int |
calcLowFreqMinimumNumberShouldMatch(int numOptional) |
protected int |
calcMinimumNumberShouldMatch(String spec,
int numOptional) |
String |
getHighFreqMinimumNumberShouldMatchSpec() |
String |
getLowFreqMinimumNumberShouldMatchSpec() |
protected org.apache.lucene.search.Query |
newTermQuery(org.apache.lucene.index.Term term,
org.apache.lucene.index.TermContext context) |
void |
setHighFreqMinimumNumberShouldMatch(String spec) |
void |
setLowFreqMinimumNumberShouldMatch(String spec) |
add, buildQuery, collectTermContext, equals, getHighFreqMinimumNumberShouldMatch, getLowFreqMinimumNumberShouldMatch, hashCode, isCoordDisabled, rewrite, setHighFreqMinimumNumberShouldMatch, setLowFreqMinimumNumberShouldMatch, toStringpublic ExtendedCommonTermsQuery(org.apache.lucene.search.BooleanClause.Occur highFreqOccur,
org.apache.lucene.search.BooleanClause.Occur lowFreqOccur,
float maxTermFrequency,
boolean disableCoord,
MappedFieldType fieldType)
protected int calcLowFreqMinimumNumberShouldMatch(int numOptional)
calcLowFreqMinimumNumberShouldMatch in class org.apache.lucene.queries.CommonTermsQueryprotected int calcMinimumNumberShouldMatch(String spec, int numOptional)
protected int calcHighFreqMinimumNumberShouldMatch(int numOptional)
calcHighFreqMinimumNumberShouldMatch in class org.apache.lucene.queries.CommonTermsQuerypublic void setHighFreqMinimumNumberShouldMatch(String spec)
public String getHighFreqMinimumNumberShouldMatchSpec()
public void setLowFreqMinimumNumberShouldMatch(String spec)
public String getLowFreqMinimumNumberShouldMatchSpec()
protected org.apache.lucene.search.Query newTermQuery(org.apache.lucene.index.Term term,
org.apache.lucene.index.TermContext context)
newTermQuery in class org.apache.lucene.queries.CommonTermsQueryCopyright © 2009–2017. All rights reserved.