Package org.apache.lucene.search
Interface MaxNonCompetitiveBoostAttribute
-
- All Superinterfaces:
Attribute
- All Known Implementing Classes:
MaxNonCompetitiveBoostAttributeImpl
public interface MaxNonCompetitiveBoostAttribute extends Attribute
Add thisAttributeto a freshAttributeSourcebefore callingMultiTermQuery.getTermsEnum(Terms,AttributeSource).FuzzyQueryis using this to control its internal behaviour to only return competitive terms.Please note: This attribute is intended to be added by the
MultiTermQuery.RewriteMethodto an emptyAttributeSourcethat is shared for all segments during query rewrite. This attribute source is passed to all segment enums onMultiTermQuery.getTermsEnum(Terms,AttributeSource).TopTermsRewriteuses this attribute to inform all enums about the current boost, that is not competitive.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BytesRefgetCompetitiveTerm()This is the term ornullof the term that triggered the boost change.floatgetMaxNonCompetitiveBoost()This is the maximum boost that would not be competitive.voidsetCompetitiveTerm(BytesRef competitiveTerm)This is the term ornullof the term that triggered the boost change.voidsetMaxNonCompetitiveBoost(float maxNonCompetitiveBoost)This is the maximum boost that would not be competitive.
-
-
-
Method Detail
-
setMaxNonCompetitiveBoost
void setMaxNonCompetitiveBoost(float maxNonCompetitiveBoost)
This is the maximum boost that would not be competitive.
-
getMaxNonCompetitiveBoost
float getMaxNonCompetitiveBoost()
This is the maximum boost that would not be competitive. Default is negative infinity, which means every term is competitive.
-
setCompetitiveTerm
void setCompetitiveTerm(BytesRef competitiveTerm)
This is the term ornullof the term that triggered the boost change.
-
getCompetitiveTerm
BytesRef getCompetitiveTerm()
This is the term ornullof the term that triggered the boost change. Default isnull, which means every term is competitoive.
-
-