Class ShingleTokenFilter.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase.AbstractBuilder<ShingleTokenFilter.Builder>
co.elastic.clients.elasticsearch._types.analysis.ShingleTokenFilter.Builder
- All Implemented Interfaces:
WithJson<ShingleTokenFilter.Builder>,ObjectBuilder<ShingleTokenFilter>
- Enclosing class:
- ShingleTokenFilter
public static class ShingleTokenFilter.Builder
extends TokenFilterBase.AbstractBuilder<ShingleTokenFilter.Builder>
implements ObjectBuilder<ShingleTokenFilter>
Builder for
ShingleTokenFilter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aShingleTokenFilter.fillerToken(String value) String used in shingles as a replacement for empty positions that do not contain a token.maxShingleSize(Integer value) Maximum number of tokens to concatenate when creating shingles.minShingleSize(Integer value) Minimum number of tokens to concatenate when creating shingles.outputUnigrams(Boolean value) Iftrue, the output includes the original input tokens.Iftrue, the output includes the original input tokens only if no shingles are produced; if shingles are produced, the output only includes shingles.protected ShingleTokenFilter.Builderself()tokenSeparator(String value) Separator used to concatenate adjacent tokens to form a shingle.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
-
fillerToken
String used in shingles as a replacement for empty positions that do not contain a token. This filler token is only used in shingles, not original unigrams. Defaults to an underscore (_).API name:
filler_token -
maxShingleSize
Maximum number of tokens to concatenate when creating shingles. Defaults to2.API name:
max_shingle_size -
minShingleSize
Minimum number of tokens to concatenate when creating shingles. Defaults to2.API name:
min_shingle_size -
outputUnigrams
Iftrue, the output includes the original input tokens. Iffalse, the output only includes shingles; the original input tokens are removed. Defaults totrue.API name:
output_unigrams -
outputUnigramsIfNoShingles
Iftrue, the output includes the original input tokens only if no shingles are produced; if shingles are produced, the output only includes shingles. Defaults tofalse.API name:
output_unigrams_if_no_shingles -
tokenSeparator
Separator used to concatenate adjacent tokens to form a shingle. Defaults to a space (" ").API name:
token_separator -
self
- Specified by:
selfin classTokenFilterBase.AbstractBuilder<ShingleTokenFilter.Builder>
-
build
Builds aShingleTokenFilter.- Specified by:
buildin interfaceObjectBuilder<ShingleTokenFilter>- Throws:
NullPointerException- if some of the required fields are null.
-