[[reference-shared-types--global-reindex]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////



== Shared Reindex types


[discrete]
[[ReindexDestination]]
=== ReindexDestination

[pass]
++++
<pre>
++++
interface ReindexDestination {
  pass:[/**] @property index The name of the data stream, index, or index alias you are copying to. */
  index: <<IndexName>>
  pass:[/**] @property op_type Set to `create` to only index documents that do not already exist. Important: To reindex to a data stream destination, this argument must be `create`. */
  op_type?: <<OpType>>
  pass:[/**] @property pipeline The name of the pipeline to use. */
  pipeline?: string
  pass:[/**] @property routing By default, a document's routing is preserved unless it’s changed by the script. Set to `discard` to set routing to `null`, or `=value` to route using the specified `value`. */
  routing?: <<Routing>>
  pass:[/**] @property version_type The versioning to use for the indexing operation. */
  version_type?: <<VersionType>>
}
[pass]
++++
</pre>
++++

[discrete]
[[ReindexRemoteSource]]
=== ReindexRemoteSource

[pass]
++++
<pre>
++++
interface ReindexRemoteSource {
  pass:[/**] @property connect_timeout The remote connection timeout. Defaults to 30 seconds. */
  connect_timeout?: <<Duration>>
  pass:[/**] @property headers An object containing the headers of the request. */
  headers?: Record<string, string>
  pass:[/**] @property host The URL for the remote instance of Elasticsearch that you want to index from. */
  host: <<Host>>
  pass:[/**] @property username The username to use for authentication with the remote host. */
  username?: <<Username>>
  pass:[/**] @property password The password to use for authentication with the remote host. */
  password?: <<Password>>
  pass:[/**] @property socket_timeout The remote socket read timeout. Defaults to 30 seconds. */
  socket_timeout?: <<Duration>>
}
[pass]
++++
</pre>
++++

[discrete]
[[ReindexRequest]]
=== ReindexRequest

[pass]
++++
<pre>
++++
interface ReindexRequest extends <<RequestBase>> {
  refresh?: boolean
  requests_per_second?: <<float>>
  scroll?: <<Duration>>
  slices?: <<Slices>>
  timeout?: <<Duration>>
  wait_for_active_shards?: <<WaitForActiveShards>>
  wait_for_completion?: boolean
  require_alias?: boolean
  conflicts?: <<Conflicts>>
  dest: <<ReindexDestination>>
  max_docs?: <<long>>
  script?: <<Script>> | string
  size?: <<long>>
  source: <<ReindexSource>>
}
[pass]
++++
</pre>
++++

[discrete]
[[ReindexResponse]]
=== ReindexResponse

[pass]
++++
<pre>
++++
interface ReindexResponse {
  batches?: <<long>>
  created?: <<long>>
  deleted?: <<long>>
  failures?: <<BulkIndexByScrollFailure>>[]
  noops?: <<long>>
  retries?: <<Retries>>
  requests_per_second?: <<float>>
  slice_id?: <<integer>>
  task?: <<TaskId>>
  throttled_millis?: <<EpochTime>><<<UnitMillis>>>
  throttled_until_millis?: <<EpochTime>><<<UnitMillis>>>
  timed_out?: boolean
  took?: <<DurationValue>><<<UnitMillis>>>
  total?: <<long>>
  updated?: <<long>>
  version_conflicts?: <<long>>
}
[pass]
++++
</pre>
++++

[discrete]
[[ReindexSource]]
=== ReindexSource

[pass]
++++
<pre>
++++
interface ReindexSource {
  pass:[/**] @property index The name of the data stream, index, or alias you are copying from. Accepts a comma-separated list to reindex from multiple sources. */
  index: <<Indices>>
  pass:[/**] @property query Specifies the documents to reindex using the <<Query>> DSL. */
  query?: <<QueryDslQueryContainer>>
  pass:[/**] @property remote A remote instance of Elasticsearch that you want to index from. */
  remote?: <<ReindexRemoteSource>>
  pass:[/**] @property size The number of documents to index per batch. Use when indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB. */
  size?: <<integer>>
  pass:[/**] @property slice Slice the reindex request manually using the provided slice ID and total number of slices. */
  slice?: <<SlicedScroll>>
  sort?: <<Sort>>
  pass:[/**] @property _source If `true` reindexes all source fields. Set to a list to reindex select fields. */
  _source?: <<Fields>>
  runtime_mappings?: <<MappingRuntimeFields>>
}
[pass]
++++
</pre>
++++
