---
type: api
title: Roll over to a new index
description: TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.
url: https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-rollover
resource: https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-rollover
products:
  - Elasticsearch
---

# Roll over to a new index

Authentication: required

Availability: Generally available since 5.0

## Paths

- `POST` `/{alias}/_rollover/{new_index}`
- `POST` `/{alias}/_rollover`

#### Path parameters

- `alias` (string) — required
  Name of the data stream or index alias to roll over.
- `new_index` (string) — optional, leave it out to use `/{alias}/_rollover`
  Name of the index to create.
Supports date math.
Data streams do not support this parameter.

## Description

TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.

The rollover API creates a new index for a data stream or index alias.
The API behavior depends on the rollover target.

**Roll over a data stream**

If you roll over a data stream, the API creates a new write index for the stream.
The stream's previous write index becomes a regular backing index.
A rollover also increments the data stream's generation.

**Roll over an index alias with a write index**

TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.

If an index alias points to multiple indices, one of the indices must be a write index.
The rollover API creates a new write index for the alias with `is_write_index` set to `true`.
The API also `sets is_write_index` to `false` for the previous write index.

**Roll over an index alias with one index**

If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.

NOTE: A rollover creates a new index and is subject to the `wait_for_active_shards` setting.

**Increment index names for an alias**

When you roll over an index alias, you can specify a name for the new index.
If you don't specify a name and the current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`, the new index name increments that number.
For example, if you roll over an alias with a current index of `my-index-000001`, the rollover creates a new index named `my-index-000002`.
This number is always six characters and zero-padded, regardless of the previous index's name.

If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
For example, you can create an alias that points to an index named `<my-index-{now/d}-000001>`.
If you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.
If you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.

## Required privileges

- Index privileges: `manage`

## Query string parameters

- `dry_run` (boolean · default: false) — optional
  If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover.
- `master_timeout` (union oneOf · default: 30s) — optional
  Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
  Values: `-1`, `0`
- `timeout` (union oneOf · default: 30s) — optional
  Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
  Values: `-1`, `0`
- `wait_for_active_shards` (union oneOf · default: 1) — optional
  The number of shard copies that must be active before proceeding with the operation.
Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
  Values: `all`, `index-setting`
- `lazy` (boolean · default: false) — optional
  If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write.
Only allowed on data streams.

## Request body

`application/json`

- `aliases` (map string to object) — optional
  Aliases for the target index.
Data streams do not support this parameter.
  Map values (object)
  - `filter` ({} Query) — optional
    Query used to limit documents the alias can access.
    See [Query](https://www.elastic.co/docs/api/doc/elasticsearch/v8/types/_types-query_dsl-querycontainer)
  - `index_routing` (string) — optional
    Value used to route indexing operations to a specific shard.
If specified, this overwrites the `routing` value for indexing operations.
  - `is_hidden` (boolean · default: false) — optional
    If `true`, the alias is hidden.
All indices for the alias must have the same `is_hidden` value.
  - `is_write_index` (boolean · default: false) — optional
    If `true`, the index is the write index for the alias.
  - `routing` (string) — optional
    Value used to route indexing and search operations to a specific shard.
  - `search_routing` (string) — optional
    Value used to route search operations to a specific shard.
If specified, this overwrites the `routing` value for search operations.
- `conditions` (object) — optional
  Conditions for the rollover.
If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions.
If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
If conditions are specified, at least one of them must be a `max_*` condition.
The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
  - `min_age` (union oneOf) — optional
    Values: `-1`, `0`
  - `max_age` (union oneOf) — optional
    Values: `-1`, `0`
  - `max_age_millis` (number) — optional
  - `min_docs` (number) — optional
  - `max_docs` (number) — optional
  - `max_size` (number | string) — optional
  - `max_size_bytes` (number) — optional
  - `min_size` (number | string) — optional
  - `min_size_bytes` (number) — optional
  - `max_primary_shard_size` (number | string) — optional
  - `max_primary_shard_size_bytes` (number) — optional
  - `min_primary_shard_size` (number | string) — optional
  - `min_primary_shard_size_bytes` (number) — optional
  - `max_primary_shard_docs` (number) — optional
  - `min_primary_shard_docs` (number) — optional
- `mappings` (object) — optional
  Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping paramaters.
  - `all_field` (object) — optional
    - `analyzer` (string) — required
    - `enabled` (boolean) — required
    - `omit_norms` (boolean) — required
    - `search_analyzer` (string) — required
    - `similarity` (string) — required
    - `store` (boolean) — required
    - `store_term_vector_offsets` (boolean) — required
    - `store_term_vector_payloads` (boolean) — required
    - `store_term_vector_positions` (boolean) — required
    - `store_term_vectors` (boolean) — required
  - `date_detection` (boolean) — optional
  - `dynamic` (enum) — optional
    Values: `strict`, `runtime`, `true`, `false`
  - `dynamic_date_formats` (string[]) — optional
  - `dynamic_templates` (string to object[]) — optional
  - `_field_names` (object) — optional
    - `enabled` (boolean) — required
  - `index_field` (object) — optional
    - `enabled` (boolean) — required
  - `_meta` (object) — optional
  - `numeric_detection` (boolean) — optional
  - `properties` (map string to oneOf) — optional
    Map values (union oneOf)
    One of:
    - **type: binary** (`type: binary`)
      - `type` (enum) — required
        Values: `binary`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
    - **type: boolean** (`type: boolean`)
      - `type` (enum) — required
        Values: `boolean`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `fielddata` (object) — optional
        - `format` (enum) — required
          Values: `array`, `disabled`
      - `index` (boolean) — optional
      - `null_value` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `script` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `time_series_dimension` (boolean) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
    - **type: {dynamic_type}** (`type: {dynamic_type}`)
      - `type` (enum) — required
        Values: `{dynamic_type}`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `enabled` (boolean) — optional
      - `null_value` (union oneOf) — optional
        One of: `number` or `string` or `boolean` or `object`
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `script` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `ignore_malformed` (boolean) — optional
      - `time_series_metric` (enum) — optional
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean) — optional
      - `analyzer` (string) — optional
      - `eager_global_ordinals` (boolean) — optional
      - `fielddata` (boolean) — optional
      - `fielddata_frequency_filter` (object) — optional
        - `max` (number) — required
        - `min` (number) — required
        - `min_segment_size` (number) — required
      - `index` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `index_phrases` (boolean) — optional
      - `index_prefixes` (union oneOf) — optional — nullable
        - **TextIndexPrefixes**
          - `max_chars` (number) — optional
          - `min_chars` (number) — optional
        - **string**
      - `norms` (boolean) — optional
      - `position_increment_gap` (number) — optional
      - `search_analyzer` (string) — optional
      - `search_quote_analyzer` (string) — optional
      - `similarity` (union string) — optional — nullable
        One of: `string`
      - `term_vector` (enum) — optional
        Values: `no`, `yes`, `with_offsets`, `with_positions`, `with_positions_offsets`, `with_positions_offsets_payloads`, `with_positions_payloads`
      - `format` (string) — optional
      - `precision_step` (number) — optional
      - `locale` (string) — optional
      - `subobjects` (enum) — optional
        Values: `true`, `false`
    - **type: join** (`type: join`)
      - `type` (enum) — required
        Values: `join`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `relations` (map string to RelationName | RelationName[]) — optional
      - `eager_global_ordinals` (boolean) — optional
    - **type: keyword** (`type: keyword`)
      - `type` (enum) — required
        Values: `keyword`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `eager_global_ordinals` (boolean) — optional
      - `index` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `script` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `normalizer` (string) — optional
      - `norms` (boolean) — optional
      - `null_value` (string) — optional
      - `similarity` (union string) — optional — nullable
        One of: `string`
      - `split_queries_on_whitespace` (boolean) — optional
      - `time_series_dimension` (boolean) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
    - **type: match_only_text** (`type: match_only_text`)
      A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field
effectively stores data the same way as a text field that only indexes documents (index_options: docs) and
disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries
that need positions such as the match_phrase query perform slower as they need to look at the _source document
to verify whether a phrase matches. All queries return constant scores that are equal to 1.0.
      - `type` (enum) — required
        Values: `match_only_text`
      - `fields` (map string to oneOf) — optional — recursive
        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.
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `copy_to` (union oneOf) — optional
        Allows you to copy the values of multiple fields into a group
field, which can then be queried as a single field.
        One of: `string[]` or `string`
    - **type: percolator** (`type: percolator`)
      - `type` (enum) — required
        Values: `percolator`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
    - **type: rank_feature** (`type: rank_feature`)
      - `type` (enum) — required
        Values: `rank_feature`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `positive_score_impact` (boolean) — optional
    - **type: rank_features** (`type: rank_features`)
      - `type` (enum) — required
        Values: `rank_features`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `positive_score_impact` (boolean) — optional
    - **type: search_as_you_type** (`type: search_as_you_type`)
      - `type` (enum) — required
        Values: `search_as_you_type`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `analyzer` (string) — optional
      - `index` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `max_shingle_size` (number) — optional
      - `norms` (boolean) — optional
      - `search_analyzer` (string) — optional
      - `search_quote_analyzer` (string) — optional
      - `similarity` (union string) — optional — nullable
        One of: `string`
      - `term_vector` (enum) — optional
        Values: `no`, `yes`, `with_offsets`, `with_positions`, `with_positions_offsets`, `with_positions_offsets_payloads`, `with_positions_payloads`
    - **type: text** (`type: text`)
      - `type` (enum) — required
        Values: `text`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `analyzer` (string) — optional
      - `boost` (number) — optional
      - `eager_global_ordinals` (boolean) — optional
      - `fielddata` (boolean) — optional
      - `fielddata_frequency_filter` (object) — optional
        - `max` (number) — required
        - `min` (number) — required
        - `min_segment_size` (number) — required
      - `index` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `index_phrases` (boolean) — optional
      - `index_prefixes` (union oneOf) — optional — nullable
        - **TextIndexPrefixes**
          - `max_chars` (number) — optional
          - `min_chars` (number) — optional
        - **string**
      - `norms` (boolean) — optional
      - `position_increment_gap` (number) — optional
      - `search_analyzer` (string) — optional
      - `search_quote_analyzer` (string) — optional
      - `similarity` (union string) — optional — nullable
        One of: `string`
      - `term_vector` (enum) — optional
        Values: `no`, `yes`, `with_offsets`, `with_positions`, `with_positions_offsets`, `with_positions_offsets_payloads`, `with_positions_payloads`
    - **type: version** (`type: version`)
      - `type` (enum) — required
        Values: `version`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
    - **type: wildcard** (`type: wildcard`)
      - `type` (enum) — required
        Values: `wildcard`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `null_value` (string) — optional
    - **type: date_nanos** (`type: date_nanos`)
      - `type` (enum) — required
        Values: `date_nanos`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `format` (string) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `script` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `null_value` (union oneOf) — optional
        One of: `string` or `number`
      - `precision_step` (number) — optional
    - **type: date** (`type: date`)
      - `type` (enum) — required
        Values: `date`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `fielddata` (object) — optional
        - `format` (enum) — required
          Values: `array`, `disabled`
      - `format` (string) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `script` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `null_value` (union oneOf) — optional
        One of: `string` or `number`
      - `precision_step` (number) — optional
      - `locale` (string) — optional
    - **type: aggregate_metric_double** (`type: aggregate_metric_double`)
      - `type` (enum) — required
        Values: `aggregate_metric_double`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `default_metric` (string) — required
      - `ignore_malformed` (boolean) — optional
      - `metrics` (string[]) — required
      - `time_series_metric` (enum) — optional
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
    - **type: dense_vector** (`type: dense_vector`)
      - `type` (enum) — required
        Values: `dense_vector`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `dims` (number) — optional
        Number of vector dimensions. Can't exceed `4096`. If `dims` is not specified, it will be set to the length of
the first vector added to the field.
      - `element_type` (enum · default: float) — optional
        The data type used to encode vectors. The supported data types are `float` (default), `byte`, and `bit`.

Supported values include:
  - `bit`: Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support
bit vectors.

NOTE: when using `bit`, the number of dimensions must be a multiple of `8` and must represent the number of bits.
  - `byte`: Indexes a 1-byte integer value per dimension.
  - `float`: Indexes a 4-byte floating-point value per dimension.
        Values: `bit`, `byte`, `float`
      - `index` (boolean · default: true) — optional
        If `true`, you can search this field using the kNN search API.
      - `index_options` (object) — optional
        An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters
that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the
expense of slower indexing speed.

This parameter can only be specified when `index` is `true`.
        - `confidence_interval` (number) — optional
          The confidence interval to use when quantizing the vectors. Can be any value between and including `0.90` and
`1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for
optimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating
the quantization thresholds.

For example, a value of `0.95` will only use the middle `95%` of the values when calculating the quantization
thresholds (e.g. the highest and lowest `2.5%` of values will be ignored).

Defaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.

Only applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types.
        - `ef_construction` (number · default: 100) — optional
          The number of candidates to track while assembling the list of nearest neighbors for each new node.

Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
        - `m` (number · default: 16) — optional
          The number of neighbors each node will be connected to in the HNSW graph.

Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
        - `type` (enum) — required
          The type of kNN algorithm to use.

Supported values include:
  - `bbq_flat`: This utilizes a brute-force search algorithm in addition to automatically quantizing to binary vectors.
Only supports `element_type` of `float`.
  - `bbq_hnsw`: This utilizes the HNSW algorithm in addition to automatic binary quantization for scalable approximate kNN
search with `element_type` of `float`.

This can reduce the memory footprint by nearly 32x at the cost of some accuracy.
  - `flat`: This utilizes a brute-force search algorithm for exact kNN search. This supports all `element_type` values.
  - `hnsw`: This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all `element_type` values.
  - `int4_flat`: This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization.
Only supports `element_type` of `float`.
  - `int4_hnsw`: This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN
search with `element_type` of `float`.

This can reduce the memory footprint by 8x at the cost of some accuracy.
  - `int8_flat`: This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports
`element_type` of `float`.
  - `int8_hnsw`: The default index type for `float` vectors. This utilizes the HNSW algorithm in addition to automatically scalar
quantization for scalable approximate kNN search with `element_type` of `float`.

This can reduce the memory footprint by 4x at the cost of some accuracy.
          Values: `bbq_flat`, `bbq_hnsw`, `flat`, `hnsw`, `int4_flat`, `int4_hnsw`, `int8_flat`, `int8_hnsw`
      - `similarity` (enum) — optional
        The vector similarity metric to use in kNN search.

Documents are ranked by their vector field's similarity to the query vector. The `_score` of each document will
be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds
to a higher ranking.

Defaults to `l2_norm` when `element_type` is `bit` otherwise defaults to `cosine`.

`bit` vectors only support `l2_norm` as their similarity metric.

This parameter can only be specified when `index` is `true`.

Supported values include:
  - `cosine`: Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with `cosine`
similarity to unit length. This allows to internally use `dot_product` for computing similarity, which is more
efficient. Original un-normalized vectors can be still accessed through scripts.

The document `_score` is computed as `(1 + cosine(query, vector)) / 2`.

The `cosine` similarity does not allow vectors with zero magnitude, since cosine is not defined in this case.
  - `dot_product`: Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity.
The constraints and computed score are defined by `element_type`.

When `element_type` is `float`, all vectors must be unit length, including both document and query vectors.

The document `_score` is computed as `(1 + dot_product(query, vector)) / 2`.

When `element_type` is `byte`, all vectors must have the same length including both document and query vectors or
results will be inaccurate.

The document `_score` is computed as `0.5 + (dot_product(query, vector) / (32768 * dims))` where `dims` is the
number of dimensions per vector.
  - `l2_norm`: Computes similarity based on the `L2` distance (also known as Euclidean distance) between the vectors.

The document `_score` is computed as `1 / (1 + l2_norm(query, vector)^2)`.

For `bit` vectors, instead of using `l2_norm`, the `hamming` distance between the vectors is used.

The `_score` transformation is `(numBits - hamming(a, b)) / numBits`.
  - `max_inner_product`: Computes the maximum inner product of two vectors. This is similar to `dot_product`, but doesn't require vectors
to be normalized. This means that each vector’s magnitude can significantly effect the score.

The document `_score` is adjusted to prevent negative values. For `max_inner_product` values `< 0`, the `_score`
is `1 / (1 + -1 * max_inner_product(query, vector))`. For non-negative `max_inner_product` results the `_score`
is calculated `max_inner_product(query, vector) + 1`.
        Values: `cosine`, `dot_product`, `l2_norm`, `max_inner_product`
    - **type: flattened** (`type: flattened`)
      - `type` (enum) — required
        Values: `flattened`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `boost` (number) — optional
      - `depth_limit` (number) — optional
      - `doc_values` (boolean) — optional
      - `eager_global_ordinals` (boolean) — optional
      - `index` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `null_value` (string) — optional
      - `similarity` (string) — optional
      - `split_queries_on_whitespace` (boolean) — optional
      - `time_series_dimensions` (string[]) — optional
    - **type: nested** (`type: nested`)
      - `type` (enum) — required
        Values: `nested`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `enabled` (boolean) — optional
      - `include_in_parent` (boolean) — optional
      - `include_in_root` (boolean) — optional
    - **type: object** (`type: object`)
      - `type` (enum) — optional
        Values: `object`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `enabled` (boolean) — optional
      - `subobjects` (enum) — optional
        Values: `true`, `false`
    - **type: passthrough** (`type: passthrough`)
      - `type` (enum) — optional
        Values: `passthrough`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `enabled` (boolean) — optional
      - `priority` (number) — optional
      - `time_series_dimension` (boolean) — optional
    - **type: rank_vectors** (`type: rank_vectors`)
      Technical preview
      - `type` (enum) — required
        Values: `rank_vectors`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `element_type` (enum) — optional
        Values: `byte`, `float`, `bit`
      - `dims` (number) — optional
    - **type: semantic_text** (`type: semantic_text`)
      - `type` (enum) — required
        Values: `semantic_text`
      - `meta` (map string to string) — optional
      - `inference_id` (string · default: .elser-2-elasticsearch) — optional
        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.
      - `search_inference_id` (string) — optional
        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.
      - `index_options` (object) — optional
        Settings for index_options that override any defaults used by semantic_text, for example
specific quantization settings.
        - `dense_vector` (object) — optional
          - `confidence_interval` (number) — optional
            The confidence interval to use when quantizing the vectors. Can be any value between and including `0.90` and
`1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for
optimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating
the quantization thresholds.

For example, a value of `0.95` will only use the middle `95%` of the values when calculating the quantization
thresholds (e.g. the highest and lowest `2.5%` of values will be ignored).

Defaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.

Only applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types.
          - `ef_construction` (number · default: 100) — optional
            The number of candidates to track while assembling the list of nearest neighbors for each new node.

Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
          - `m` (number · default: 16) — optional
            The number of neighbors each node will be connected to in the HNSW graph.

Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
          - `type` (enum) — required
            The type of kNN algorithm to use.

Supported values include:
  - `bbq_flat`: This utilizes a brute-force search algorithm in addition to automatically quantizing to binary vectors.
Only supports `element_type` of `float`.
  - `bbq_hnsw`: This utilizes the HNSW algorithm in addition to automatic binary quantization for scalable approximate kNN
search with `element_type` of `float`.

This can reduce the memory footprint by nearly 32x at the cost of some accuracy.
  - `flat`: This utilizes a brute-force search algorithm for exact kNN search. This supports all `element_type` values.
  - `hnsw`: This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all `element_type` values.
  - `int4_flat`: This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization.
Only supports `element_type` of `float`.
  - `int4_hnsw`: This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN
search with `element_type` of `float`.

This can reduce the memory footprint by 8x at the cost of some accuracy.
  - `int8_flat`: This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports
`element_type` of `float`.
  - `int8_hnsw`: The default index type for `float` vectors. This utilizes the HNSW algorithm in addition to automatically scalar
quantization for scalable approximate kNN search with `element_type` of `float`.

This can reduce the memory footprint by 4x at the cost of some accuracy.
            Values: `bbq_flat`, `bbq_hnsw`, `flat`, `hnsw`, `int4_flat`, `int4_hnsw`, `int8_flat`, `int8_hnsw`
      - `chunking_settings` (object) — optional
        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.
        - `strategy` (string · default: sentence) — required
          The chunking strategy: `sentence` or `word`.
        - `max_chunk_size` (number · default: 250) — required
          The maximum size of a chunk in words.
This value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).
        - `overlap` (number · default: 100) — optional
          The number of overlapping words for chunks.
It is applicable only to a `word` chunking strategy.
This value cannot be higher than half the `max_chunk_size` value.
        - `sentence_overlap` (number · default: 1) — optional
          The number of overlapping sentences for chunks.
It is applicable only for a `sentence` chunking strategy.
It can be either `1` or `0`.
      - `fields` (map string to oneOf) — optional — recursive
        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.
    - **type: sparse_vector** (`type: sparse_vector`)
      - `type` (enum) — required
        Values: `sparse_vector`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `store` (boolean) — optional
      - `index_options` (object) — optional
        Additional index options for the sparse vector field that controls the
token pruning behavior of the sparse vector field.
        - `prune` (boolean) — optional
          Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.
If prune is true but the pruning_config is not specified, pruning will occur but default values will be used.
Default: false
        - `pruning_config` (object) — optional
          Optional pruning configuration.
If enabled, this will omit non-significant tokens from the query in order to improve query performance.
This is only used if prune is set to true.
If prune is set to true but pruning_config is not specified, default values will be used.
          - `tokens_freq_ratio_threshold` (number · default: 5) — optional
            Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.
          - `tokens_weight_threshold` (number · default: 0.4) — optional
            Tokens whose weight is less than this threshold are considered nonsignificant and pruned.
          - `only_score_pruned_tokens` (boolean · default: false) — optional
            Whether to only score pruned tokens, vs only scoring kept tokens.
    - **type: completion** (`type: completion`)
      - `type` (enum) — required
        Values: `completion`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `analyzer` (string) — optional
      - `contexts` (object[]) — optional
        - `name` (string) — required
        - `path` (string) — optional
        - `type` (string) — required
        - `precision` (number | string) — optional
      - `max_input_length` (number) — optional
      - `preserve_position_increments` (boolean) — optional
      - `preserve_separators` (boolean) — optional
      - `search_analyzer` (string) — optional
    - **type: constant_keyword** (`type: constant_keyword`)
      - `type` (enum) — required
        Values: `constant_keyword`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `value` (object) — optional
    - **type: counted_keyword** (`type: counted_keyword`)
      - `type` (enum) — required
        Values: `counted_keyword`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `index` (boolean) — optional
    - **type: alias** (`type: alias`)
      - `type` (enum) — required
        Values: `alias`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `path` (string) — optional
    - **type: histogram** (`type: histogram`)
      - `type` (enum) — required
        Values: `histogram`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `ignore_malformed` (boolean) — optional
    - **type: ip** (`type: ip`)
      - `type` (enum) — required
        Values: `ip`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `index` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `null_value` (string) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_dimension` (boolean) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
    - **type: murmur3** (`type: murmur3`)
      - `type` (enum) — required
        Values: `murmur3`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
    - **type: token_count** (`type: token_count`)
      - `type` (enum) — required
        Values: `token_count`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `analyzer` (string) — optional
      - `boost` (number) — optional
      - `index` (boolean) — optional
      - `null_value` (number) — optional
      - `enable_position_increments` (boolean) — optional
    - **type: geo_point** (`type: geo_point`)
      - `type` (enum) — required
        Values: `geo_point`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `ignore_z_value` (boolean) — optional
      - `null_value` (union oneOf) — optional
        - **LatLonGeoLocation**
          - `lat` (number) — required
            Latitude
          - `lon` (number) — required
            Longitude
        - **GeoHashLocation**
          - `geohash` (string) — required
        - **[]number**
        - **string**
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        Values: `gauge`, `counter`, `position`
    - **type: geo_shape** (`type: geo_shape`)
      The `geo_shape` data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles
and polygons.
      - `type` (enum) — required
        Values: `geo_shape`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `ignore_z_value` (boolean) — optional
      - `index` (boolean) — optional
      - `orientation` (enum) — optional
        Values: `right`, `RIGHT`, `counterclockwise`, `ccw`, `left`, `LEFT`, `clockwise`, `cw`
      - `strategy` (enum) — optional
        Values: `recursive`, `term`
    - **type: point** (`type: point`)
      - `type` (enum) — required
        Values: `point`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `ignore_z_value` (boolean) — optional
      - `null_value` (string) — optional
    - **type: shape** (`type: shape`)
      The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as
rectangles and polygons.
      - `type` (enum) — required
        Values: `shape`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `ignore_z_value` (boolean) — optional
      - `orientation` (enum) — optional
        Values: `right`, `RIGHT`, `counterclockwise`, `ccw`, `left`, `LEFT`, `clockwise`, `cw`
    - **type: byte** (`type: byte`)
      - `type` (enum) — required
        Values: `byte`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: double** (`type: double`)
      - `type` (enum) — required
        Values: `double`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: float** (`type: float`)
      - `type` (enum) — required
        Values: `float`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: half_float** (`type: half_float`)
      - `type` (enum) — required
        Values: `half_float`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: integer** (`type: integer`)
      - `type` (enum) — required
        Values: `integer`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: long** (`type: long`)
      - `type` (enum) — required
        Values: `long`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: scaled_float** (`type: scaled_float`)
      - `type` (enum) — required
        Values: `scaled_float`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
      - `scaling_factor` (number) — optional
    - **type: short** (`type: short`)
      - `type` (enum) — required
        Values: `short`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: unsigned_long** (`type: unsigned_long`)
      - `type` (enum) — required
        Values: `unsigned_long`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `ignore_malformed` (boolean) — optional
      - `index` (boolean) — optional
      - `on_script_error` (enum) — optional
        Values: `fail`, `continue`
      - `script` (string) — optional
      - `time_series_metric` (enum) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
        Values: `gauge`, `counter`, `summary`, `histogram`, `position`
      - `time_series_dimension` (boolean · default: false) — optional
        For internal use by Elastic only. Marks the field as a time series dimension. Defaults to false.
      - `null_value` (number) — optional
    - **type: date_range** (`type: date_range`)
      - `type` (enum) — required
        Values: `date_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
      - `format` (string) — optional
    - **type: double_range** (`type: double_range`)
      - `type` (enum) — required
        Values: `double_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
    - **type: float_range** (`type: float_range`)
      - `type` (enum) — required
        Values: `float_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
    - **type: integer_range** (`type: integer_range`)
      - `type` (enum) — required
        Values: `integer_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
    - **type: ip_range** (`type: ip_range`)
      - `type` (enum) — required
        Values: `ip_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
    - **type: long_range** (`type: long_range`)
      - `type` (enum) — required
        Values: `long_range`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `boost` (number) — optional
      - `coerce` (boolean) — optional
      - `index` (boolean) — optional
    - **type: icu_collation_keyword** (`type: icu_collation_keyword`)
      - `type` (enum) — required
        Values: `icu_collation_keyword`
      - `meta` (map string to string) — optional
        Metadata about the field.
      - `properties` (map string to oneOf) — optional — recursive
      - `ignore_above` (number) — optional
      - `dynamic` (enum) — optional
        Values: `strict`, `runtime`, `true`, `false`
      - `fields` (map string to oneOf) — optional — recursive
      - `synthetic_source_keep` (enum) — optional
        

Supported values include:
  - `none`: Synthetic source diverges from the original source (default)
  - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
The exact format may change in the future, in an effort to reduce the storage overhead of this option.
  - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
When applied to objects, the source of all sub-objects and sub-fields gets captured.
Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.
        Values: `none`, `arrays`, `all`
      - `copy_to` (union oneOf) — optional
        One of: `string[]` or `string`
      - `store` (boolean) — optional
      - `doc_values` (boolean) — optional
      - `norms` (boolean) — optional
      - `index_options` (enum) — optional
        Values: `docs`, `freqs`, `positions`, `offsets`
      - `index` (boolean) — optional
        Should the field be searchable?
      - `null_value` (string) — optional
        Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing.
      - `rules` (string) — optional
      - `language` (string) — optional
      - `country` (string) — optional
      - `variant` (string) — optional
      - `strength` (enum) — optional
        Values: `primary`, `secondary`, `tertiary`, `quaternary`, `identical`
      - `decomposition` (enum) — optional
        Values: `no`, `identical`
      - `alternate` (enum) — optional
        Values: `shifted`, `non-ignorable`
      - `case_level` (boolean) — optional
      - `case_first` (enum) — optional
        Values: `lower`, `upper`
      - `numeric` (boolean) — optional
      - `variable_top` (string) — optional
      - `hiragana_quaternary_mode` (boolean) — optional
  - `_routing` (object) — optional
    - `required` (boolean) — required
  - `_size` (object) — optional
    - `enabled` (boolean) — required
  - `_source` (object) — optional
    - `compress` (boolean) — optional
    - `compress_threshold` (string) — optional
    - `enabled` (boolean) — optional
    - `excludes` (string[]) — optional
    - `includes` (string[]) — optional
    - `mode` (enum) — optional
      

Supported values include:
  - `disabled`
  - `stored`
  - `synthetic`: Instead of storing source documents on disk exactly as you send them,
 Elasticsearch can reconstruct source content on the fly upon retrieval.
      Values: `disabled`, `stored`, `synthetic`
  - `runtime` (map string to object) — optional
    Map values (object)
    - `fields` (map string to object) — optional
      For type `composite`
      Map values (object)
      - `type` (enum) — required
        Values: `boolean`, `composite`, `date`, `double`, `geo_point`, `geo_shape`, `ip`, `keyword`, `long`, `lookup`
    - `fetch_fields` (object[]) — optional
      For type `lookup`
      - `field` (string) — required
      - `format` (string) — optional
    - `format` (string) — optional
      A custom format for `date` type runtime fields.
    - `input_field` (string) — optional
      For type `lookup`
    - `target_field` (string) — optional
      For type `lookup`
    - `target_index` (string) — optional
      For type `lookup`
    - `script` (string) — optional
      Painless script executed at query time.
    - `on_script_error` (enum) — optional
      Values: `fail`, `continue`
    - `type` (enum) — required
      Field type, which can be: `boolean`, `composite`, `date`, `double`, `geo_point`, `ip`,`keyword`, `long`, or `lookup`.
      Values: `boolean`, `composite`, `date`, `double`, `geo_point`, `geo_shape`, `ip`, `keyword`, `long`, `lookup`
  - `enabled` (boolean) — optional
  - `subobjects` (enum) — optional
    Values: `true`, `false`
  - `_data_stream_timestamp` (object) — optional
    - `enabled` (boolean) — required
- `settings` (map string to object) — optional
  Configuration options for the index.
Data streams do not support this parameter.

## Response

`application/json`

- `acknowledged` (boolean)
- `conditions` (map string to boolean)
- `dry_run` (boolean)
- `new_index` (string)
- `old_index` (string)
- `rolled_over` (boolean)
- `shards_acknowledged` (boolean)
## Code examples

#### Console

```console
POST my-data-stream/_rollover
{
  "conditions": {
    "max_age": "7d",
    "max_docs": 1000,
    "max_primary_shard_size": "50gb",
    "max_primary_shard_docs": "2000"
  }
}
```

#### JavaScript

```javascript
const response = await client.indices.rollover({
  alias: "my-data-stream",
  conditions: {
    max_age: "7d",
    max_docs: 1000,
    max_primary_shard_size: "50gb",
    max_primary_shard_docs: "2000",
  },
});
```

#### Python

```python
resp = client.indices.rollover(
    alias="my-data-stream",
    conditions={
        "max_age": "7d",
        "max_docs": 1000,
        "max_primary_shard_size": "50gb",
        "max_primary_shard_docs": "2000"
    },
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/my-data-stream/_rollover" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "conditions": {
      "max_age": "7d",
      "max_docs": 1000,
      "max_primary_shard_size": "50gb",
      "max_primary_shard_docs": "2000"
    }
  }'
```

#### Java

```java
client.indices().rollover(r -> r
    .alias("my-data-stream")
    .conditions(c -> c
        .maxAge(m -> m
            .time("7d")
        )
        .maxDocs(1000L)
        .maxPrimaryShardSize("50gb")
        .maxPrimaryShardDocs(2000L)
    )
);
```

#### C#

```c#
var response = await client.Indices
    .RolloverAsync(new RolloverRequest()
    {
        Alias = "my-data-stream",
        Conditions = new()
        {
            MaxAge = "7d",
            MaxDocs = 1000L,
            MaxPrimaryShardDocs = 2000L,
            MaxPrimaryShardSize = new ByteSize("50gb")
        }
    });
```

#### PHP

```php
$resp = $client->indices()->rollover([
    "alias" => "my-data-stream",
    "body" => [
        "conditions" => [
            "max_age" => "7d",
            "max_docs" => 1000,
            "max_primary_shard_size" => "50gb",
            "max_primary_shard_docs" => "2000",
        ],
    ],
]);
```

#### Ruby

```ruby
response = client.indices.rollover(
  alias: "my-data-stream",
  body: {
    "conditions": {
      "max_age": "7d",
      "max_docs": 1000,
      "max_primary_shard_size": "50gb",
      "max_primary_shard_docs": "2000"
    }
  }
)
```

## Response examples

#### Indices rollover response example1

`application/json`

An abbreviated response from `GET /_segments`.

```json
{
  "_shards": {},
  "indices": {
    "test": {
      "shards": {
        "0": [
          {
            "routing": {
              "state": "STARTED",
              "primary": true,
              "node": "zDC_RorJQCao9xf9pg3Fvw"
            },
            "num_committed_segments": 0,
            "num_search_segments": 1,
            "segments": {
              "_0": {
                "generation": 0,
                "num_docs": 1,
                "deleted_docs": 0,
                "size_in_bytes": 3800,
                "committed": false,
                "search": true,
                "version": "7.0.0",
                "compound": true,
                "attributes": {}
              }
            }
          }
        ]
      }
    }
  }
}
```

