Class AnalyzeRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.indices.AnalyzeRequest
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<AnalyzeRequest.Builder,AnalyzeRequest>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public final class AnalyzeRequest extends RequestBase implements PlainJsonSerializable, ToCopyableBuilder<AnalyzeRequest.Builder,AnalyzeRequest>
Performs the analysis process on a text and return the tokens breakdown of the text.
  • Field Details

  • Method Details

    • of

    • analyzer

      @Nullable public final String analyzer()
      The name of the analyzer that should be applied to the provided text. This could be a built-in analyzer, or an analyzer that's been configured in the index.

      API name: analyzer

    • attributes

      @Nonnull public final List<String> attributes()
      Array of token attributes used to filter the output of the explain parameter.

      API name: attributes

    • charFilter

      @Nonnull public final List<CharFilter> charFilter()
      Array of character filters used to preprocess characters before the tokenizer.

      API name: char_filter

    • explain

      @Nullable public final Boolean explain()
      If true, the response includes token attributes and additional details.

      API name: explain

    • field

      @Nullable public final String field()
      API name: field
    • filter

      @Nonnull public final List<TokenFilter> filter()
      Array of token filters used to apply after the tokenizer.

      API name: filter

    • index

      @Nullable public final String index()
      Index used to derive the analyzer. If specified, the analyzer or 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

      @Nullable public final String normalizer()
      Normalizer to use to convert text into a single token.

      API name: normalizer

    • text

      @Nonnull public final List<String> text()
      API name: text
    • tokenizer

      @Nullable public final Tokenizer tokenizer()
      API name: tokenizer
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public AnalyzeRequest.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<AnalyzeRequest.Builder,AnalyzeRequest>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static AnalyzeRequest.Builder builder()
    • setupAnalyzeRequestDeserializer

      protected static void setupAnalyzeRequestDeserializer(ObjectDeserializer<AnalyzeRequest.Builder> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object