Class AnalyzeRequest.Builder
- All Implemented Interfaces:
WithJson<AnalyzeRequest.Builder>,ObjectBuilder<AnalyzeRequest>
- Enclosing class:
- AnalyzeRequest
AnalyzeRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AnalyzeRequest.BuilderThe name of the analyzer that should be applied to the providedtext.final AnalyzeRequest.Builderattributes(String value, String... values) Array of token attributes used to filter the output of theexplainparameter.final AnalyzeRequest.Builderattributes(List<String> list) Array of token attributes used to filter the output of theexplainparameter.build()Builds aAnalyzeRequest.final AnalyzeRequest.BuildercharFilter(CharFilter value, CharFilter... values) Array of character filters used to preprocess characters before the tokenizer.final AnalyzeRequest.BuilderArray of character filters used to preprocess characters before the tokenizer.final AnalyzeRequest.BuildercharFilter(List<CharFilter> list) Array of character filters used to preprocess characters before the tokenizer.final AnalyzeRequest.BuilderIftrue, the response includes token attributes and additional details.final AnalyzeRequest.BuilderField used to derive the analyzer.final AnalyzeRequest.Builderfilter(TokenFilter value, TokenFilter... values) Array of token filters used to apply after the tokenizer.final AnalyzeRequest.BuilderArray of token filters used to apply after the tokenizer.final AnalyzeRequest.Builderfilter(List<TokenFilter> list) Array of token filters used to apply after the tokenizer.final AnalyzeRequest.BuilderIndex used to derive the analyzer.final AnalyzeRequest.Buildernormalizer(String value) Normalizer to use to convert text into a single token.protected AnalyzeRequest.Builderself()final AnalyzeRequest.BuilderText to analyze.final AnalyzeRequest.BuilderText to analyze.final AnalyzeRequest.BuilderTokenizer to use to convert text into tokens.final AnalyzeRequest.BuilderTokenizer to use to convert text into tokens.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
-
analyzer
The name of the analyzer that should be applied to the providedtext. This could be a built-in analyzer, or an analyzer that’s been configured in the index.API name:
analyzer -
attributes
Array of token attributes used to filter the output of theexplainparameter.API name:
attributesAdds all elements of
listtoattributes. -
attributes
Array of token attributes used to filter the output of theexplainparameter.API name:
attributesAdds one or more values to
attributes. -
charFilter
Array of character filters used to preprocess characters before the tokenizer.API name:
char_filterAdds all elements of
listtocharFilter. -
charFilter
Array of character filters used to preprocess characters before the tokenizer.API name:
char_filterAdds one or more values to
charFilter. -
charFilter
public final AnalyzeRequest.Builder charFilter(Function<CharFilter.Builder, ObjectBuilder<CharFilter>> fn) Array of character filters used to preprocess characters before the tokenizer.API name:
char_filterAdds a value to
charFilterusing a builder lambda. -
explain
Iftrue, the response includes token attributes and additional details.API name:
explain -
field
Field used to derive the analyzer. To use this parameter, you must specify an index. If specified, theanalyzerparameter overrides this value.API name:
field -
filter
Array of token filters used to apply after the tokenizer.API name:
filterAdds all elements of
listtofilter. -
filter
Array of token filters used to apply after the tokenizer.API name:
filterAdds one or more values to
filter. -
filter
public final AnalyzeRequest.Builder filter(Function<TokenFilter.Builder, ObjectBuilder<TokenFilter>> fn) Array of token filters used to apply after the tokenizer.API name:
filterAdds a value to
filterusing a builder lambda. -
index
Index used to derive the analyzer. If specified, theanalyzeror field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.API name:
index -
normalizer
Normalizer to use to convert text into a single token.API name:
normalizer -
text
Text to analyze. If an array of strings is provided, it is analyzed as a multi-value field.API name:
textAdds all elements of
listtotext. -
text
Text to analyze. If an array of strings is provided, it is analyzed as a multi-value field.API name:
textAdds one or more values to
text. -
tokenizer
Tokenizer to use to convert text into tokens.API name:
tokenizer -
tokenizer
public final AnalyzeRequest.Builder tokenizer(Function<Tokenizer.Builder, ObjectBuilder<Tokenizer>> fn) Tokenizer to use to convert text into tokens.API name:
tokenizer -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<AnalyzeRequest.Builder>
-
build
Builds aAnalyzeRequest.- Specified by:
buildin interfaceObjectBuilder<AnalyzeRequest>- Throws:
NullPointerException- if some of the required fields are null.
-