Class CommonGramsTokenFilter.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase.AbstractBuilder<CommonGramsTokenFilter.Builder>
co.elastic.clients.elasticsearch._types.analysis.CommonGramsTokenFilter.Builder
- All Implemented Interfaces:
WithJson<CommonGramsTokenFilter.Builder>,ObjectBuilder<CommonGramsTokenFilter>
- Enclosing class:
- CommonGramsTokenFilter
public static class CommonGramsTokenFilter.Builder
extends TokenFilterBase.AbstractBuilder<CommonGramsTokenFilter.Builder>
implements ObjectBuilder<CommonGramsTokenFilter>
Builder for
CommonGramsTokenFilter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCommonGramsTokenFilter.commonWords(String value, String... values) A list of tokens.commonWords(List<String> list) A list of tokens.commonWordsPath(String value) Path to a file containing a list of tokens.ignoreCase(Boolean value) Iftrue, matches for common words matching are case-insensitive.Iftrue, the filter excludes the following tokens from the output: Unigrams for common words Unigrams for terms followed by common words Defaults tofalse.protected CommonGramsTokenFilter.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
-
commonWords
A list of tokens. The filter generates bigrams for these tokens. Either this or thecommon_words_pathparameter is required.API name:
common_wordsAdds all elements of
listtocommonWords. -
commonWords
A list of tokens. The filter generates bigrams for these tokens. Either this or thecommon_words_pathparameter is required.API name:
common_wordsAdds one or more values to
commonWords. -
commonWordsPath
Path to a file containing a list of tokens. The filter generates bigrams for these tokens. This path must be absolute or relative to theconfiglocation. The file must be UTF-8 encoded. Each token in the file must be separated by a line break. Either this or thecommon_wordsparameter is required.API name:
common_words_path -
ignoreCase
Iftrue, matches for common words matching are case-insensitive. Defaults tofalse.API name:
ignore_case -
queryMode
Iftrue, the filter excludes the following tokens from the output:- Unigrams for common words
- Unigrams for terms followed by common words Defaults to
false. We recommend enabling this parameter for search analyzers.
API name:
query_mode -
self
- Specified by:
selfin classTokenFilterBase.AbstractBuilder<CommonGramsTokenFilter.Builder>
-
build
Builds aCommonGramsTokenFilter.- Specified by:
buildin interfaceObjectBuilder<CommonGramsTokenFilter>- Throws:
NullPointerException- if some of the required fields are null.
-