Class TokenPruningConfig.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TokenPruningConfig.Builder>
co.elastic.clients.elasticsearch._types.TokenPruningConfig.Builder
- All Implemented Interfaces:
WithJson<TokenPruningConfig.Builder>,ObjectBuilder<TokenPruningConfig>
- Enclosing class:
- TokenPruningConfig
public static class TokenPruningConfig.Builder
extends WithJsonObjectBuilderBase<TokenPruningConfig.Builder>
implements ObjectBuilder<TokenPruningConfig>
Builder for
TokenPruningConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTokenPruningConfig.onlyScorePrunedTokens(Boolean value) Whether to only score pruned tokens, vs only scoring kept tokens.protected TokenPruningConfig.Builderself()tokensFreqRatioThreshold(Integer value) Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.tokensWeightThreshold(Float value) Tokens whose weight is less than this threshold are considered nonsignificant and pruned.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
tokensFreqRatioThreshold
Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.API name:
tokens_freq_ratio_threshold -
tokensWeightThreshold
Tokens whose weight is less than this threshold are considered nonsignificant and pruned.API name:
tokens_weight_threshold -
onlyScorePrunedTokens
Whether to only score pruned tokens, vs only scoring kept tokens.API name:
only_score_pruned_tokens -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<TokenPruningConfig.Builder>
-
build
Builds aTokenPruningConfig.- Specified by:
buildin interfaceObjectBuilder<TokenPruningConfig>- Throws:
NullPointerException- if some of the required fields are null.
-