Class SemanticTextProperty.Builder

All Implemented Interfaces:
WithJson<SemanticTextProperty.Builder>, ObjectBuilder<SemanticTextProperty>
Enclosing class:
SemanticTextProperty

public static class SemanticTextProperty.Builder extends WithJsonObjectBuilderBase<SemanticTextProperty.Builder> implements ObjectBuilder<SemanticTextProperty>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • meta

      public final SemanticTextProperty.Builder meta(Map<String,String> map)
      API name: meta

      Adds all entries of map to meta.

    • meta

      public final SemanticTextProperty.Builder meta(String key, String value)
      API name: meta

      Adds an entry to meta.

    • inferenceId

      public final SemanticTextProperty.Builder inferenceId(@Nullable String value)
      Inference endpoint that will be used to generate embeddings for the field. This parameter cannot be updated. Use the Create inference API to create the endpoint. If search_inference_id is specified, the inference endpoint will only be used at index time.

      API name: inference_id

    • searchInferenceId

      public final SemanticTextProperty.Builder searchInferenceId(@Nullable String value)
      Inference endpoint that will be used to generate embeddings at query time. You can update this parameter by using the Update mapping API. Use the Create inference API to create the endpoint. If not specified, the inference endpoint defined by inference_id will be used at both index and query time.

      API name: search_inference_id

    • indexOptions

      public final SemanticTextProperty.Builder indexOptions(@Nullable SemanticTextIndexOptions value)
      Settings for index_options that override any defaults used by semantic_text, for example specific quantization settings.

      API name: index_options

    • indexOptions

      Settings for index_options that override any defaults used by semantic_text, for example specific quantization settings.

      API name: index_options

    • chunkingSettings

      public final SemanticTextProperty.Builder chunkingSettings(@Nullable ChunkingSettings value)
      Settings for chunking text into smaller passages. If specified, these will override the chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, they will not be applied to existing documents until they are reindexed.

      API name: chunking_settings

    • chunkingSettings

      Settings for chunking text into smaller passages. If specified, these will override the chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, they will not be applied to existing documents until they are reindexed.

      API name: chunking_settings

    • fields

      public final SemanticTextProperty.Builder fields(Map<String,Property> map)
      Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.

      API name: fields

      Adds all entries of map to fields.

    • fields

      public final SemanticTextProperty.Builder fields(String key, Property value)
      Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.

      API name: fields

      Adds an entry to fields.

    • fields

      Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.

      API name: fields

      Adds an entry to fields using a builder lambda.

    • self

      protected SemanticTextProperty.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<SemanticTextProperty.Builder>
    • build

      public SemanticTextProperty build()
      Specified by:
      build in interface ObjectBuilder<SemanticTextProperty>
      Throws:
      NullPointerException - if some of the required fields are null.