Package org.apache.lucene.queries
Class ExtendedCommonTermsQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.queries.CommonTermsQuery
-
- org.apache.lucene.queries.ExtendedCommonTermsQuery
-
@Deprecated public class ExtendedCommonTermsQuery extends CommonTermsQuery
Deprecated.Since max_optimization optimization landed in 7.0, normal MatchQuery will achieve the same result without any configuration.Extended version ofCommonTermsQuerythat allows to pass in aminimumNumberShouldMatchspecification that uses the actual num of high frequent terms to calculate the minimum matching terms.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.queries.CommonTermsQuery
highFreqBoost, highFreqMinNrShouldMatch, highFreqOccur, lowFreqBoost, lowFreqMinNrShouldMatch, lowFreqOccur, maxTermFrequency, terms
-
-
Constructor Summary
Constructors Constructor Description ExtendedCommonTermsQuery(BooleanClause.Occur highFreqOccur, BooleanClause.Occur lowFreqOccur, float maxTermFrequency)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected intcalcHighFreqMinimumNumberShouldMatch(int numOptional)Deprecated.protected intcalcLowFreqMinimumNumberShouldMatch(int numOptional)Deprecated.protected intcalcMinimumNumberShouldMatch(String spec, int numOptional)Deprecated.StringgetHighFreqMinimumNumberShouldMatchSpec()Deprecated.StringgetLowFreqMinimumNumberShouldMatchSpec()Deprecated.floatgetMaxTermFrequency()Deprecated.Gets the maximum threshold of a terms document frequency to be considered a low frequency term.voidsetHighFreqMinimumNumberShouldMatch(String spec)Deprecated.voidsetLowFreqMinimumNumberShouldMatch(String spec)Deprecated.-
Methods inherited from class org.apache.lucene.queries.CommonTermsQuery
add, buildQuery, collectTermStates, equals, getHighFreqBoost, getHighFreqMinimumNumberShouldMatch, getHighFreqOccur, getLowFreqBoost, getLowFreqMinimumNumberShouldMatch, getLowFreqOccur, getTerms, hashCode, newTermQuery, rewrite, setHighFreqMinimumNumberShouldMatch, setLowFreqMinimumNumberShouldMatch, toString, visit
-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, sameClassAs, toString
-
-
-
-
Constructor Detail
-
ExtendedCommonTermsQuery
public ExtendedCommonTermsQuery(BooleanClause.Occur highFreqOccur, BooleanClause.Occur lowFreqOccur, float maxTermFrequency)
Deprecated.
-
-
Method Detail
-
calcLowFreqMinimumNumberShouldMatch
protected int calcLowFreqMinimumNumberShouldMatch(int numOptional)
Deprecated.- Overrides:
calcLowFreqMinimumNumberShouldMatchin classCommonTermsQuery
-
calcMinimumNumberShouldMatch
protected int calcMinimumNumberShouldMatch(String spec, int numOptional)
Deprecated.
-
calcHighFreqMinimumNumberShouldMatch
protected int calcHighFreqMinimumNumberShouldMatch(int numOptional)
Deprecated.- Overrides:
calcHighFreqMinimumNumberShouldMatchin classCommonTermsQuery
-
setHighFreqMinimumNumberShouldMatch
public void setHighFreqMinimumNumberShouldMatch(String spec)
Deprecated.
-
getHighFreqMinimumNumberShouldMatchSpec
public String getHighFreqMinimumNumberShouldMatchSpec()
Deprecated.
-
setLowFreqMinimumNumberShouldMatch
public void setLowFreqMinimumNumberShouldMatch(String spec)
Deprecated.
-
getLowFreqMinimumNumberShouldMatchSpec
public String getLowFreqMinimumNumberShouldMatchSpec()
Deprecated.
-
getMaxTermFrequency
public float getMaxTermFrequency()
Deprecated.Description copied from class:CommonTermsQueryGets the maximum threshold of a terms document frequency to be considered a low frequency term.- Overrides:
getMaxTermFrequencyin classCommonTermsQuery
-
-