Class AnalyzeRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.AnalyzeRequest
- All Implemented Interfaces:
JsonpSerializable
Get tokens from text analysis. The analyze API performs analysis on a text
string and returns the resulting tokens.
Generating excessive amount of tokens may cause a node to run out of memory.
The index.analyze.max_token_count setting enables you to limit
the number of tokens that can be produced. If more than this limit of tokens
gets generated, an error occurs. The _analyze endpoint without a
specified index will always use 10000 as its limit.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<AnalyzeRequest>Json deserializer forAnalyzeRequeststatic final Endpoint<AnalyzeRequest,AnalyzeResponse, ErrorResponse> Endpoint "indices.analyze". -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringanalyzer()The name of the analyzer that should be applied to the providedtext.Array of token attributes used to filter the output of theexplainparameter.final List<CharFilter>Array of character filters used to preprocess characters before the tokenizer.final Booleanexplain()Iftrue, the response includes token attributes and additional details.final Stringfield()Field used to derive the analyzer.final List<TokenFilter>filter()Array of token filters used to apply after the tokenizer.final Stringindex()Index used to derive the analyzer.final StringNormalizer to use to convert text into a single token.static AnalyzeRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtext()Text to analyze.final TokenizerTokenizer to use to convert text into tokens.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forAnalyzeRequest -
_ENDPOINT
Endpoint "indices.analyze".
-
-
Method Details
-
of
-
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:
attributes -
charFilter
Array of character filters used to preprocess characters before the tokenizer.API name:
char_filter -
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:
filter -
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:
text -
tokenizer
Tokenizer to use to convert text into tokens.API name:
tokenizer -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupAnalyzeRequestDeserializer
protected static void setupAnalyzeRequestDeserializer(ObjectDeserializer<AnalyzeRequest.Builder> op)
-