Class LimitTokenCountTokenFilter.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase.AbstractBuilder<LimitTokenCountTokenFilter.Builder>
co.elastic.clients.elasticsearch._types.analysis.LimitTokenCountTokenFilter.Builder
- All Implemented Interfaces:
WithJson<LimitTokenCountTokenFilter.Builder>,ObjectBuilder<LimitTokenCountTokenFilter>
- Enclosing class:
- LimitTokenCountTokenFilter
public static class LimitTokenCountTokenFilter.Builder
extends TokenFilterBase.AbstractBuilder<LimitTokenCountTokenFilter.Builder>
implements ObjectBuilder<LimitTokenCountTokenFilter>
Builder for
LimitTokenCountTokenFilter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aLimitTokenCountTokenFilter.consumeAllTokens(Boolean value) Iftrue, the limit filter exhausts the token stream, even if themax_token_counthas already been reached.maxTokenCount(Integer value) Maximum number of tokens to keep.protected LimitTokenCountTokenFilter.Builderself()Methods inherited from class co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase.AbstractBuilder
versionMethods 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
-
consumeAllTokens
Iftrue, the limit filter exhausts the token stream, even if themax_token_counthas already been reached. Defaults tofalse.API name:
consume_all_tokens -
maxTokenCount
Maximum number of tokens to keep. Once this limit is reached, any remaining tokens are excluded from the output. Defaults to1.API name:
max_token_count -
self
- Specified by:
selfin classTokenFilterBase.AbstractBuilder<LimitTokenCountTokenFilter.Builder>
-
build
Builds aLimitTokenCountTokenFilter.- Specified by:
buildin interfaceObjectBuilder<LimitTokenCountTokenFilter>- Throws:
NullPointerException- if some of the required fields are null.
-