stack es reindex cli command
Auth required
elastic stack es reindex --dest <dest> --source <source> [options]
Reindex documents.
--deststringrequired- The destination you are copying to.
--sourcestringrequired- The source you are copying from.
--[no-]refresh- If
true, the request refreshes affected shards to make this operation visible to search. --requests-per-secondnumber- The throttle for this request in sub-requests per second. By default, there is no throttle.
--scrollstring- The period of time that a consistent view of the index should be maintained for scrolled search.
--slicesnumber- The number of slices this task should be divided into. It defaults to one slice, which means the task isn't sliced into subtasks. Reindex supports sliced scroll to parallelize the reindexing process. This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts. NOTE: Reindexing from remote clusters does not support manual or automatic slicing. If set to
auto, Elasticsearch chooses the number of slices to use. This setting will use one slice per shard, up to a certain limit. If there are multiple sources, it will choose the number of slices based on the index or backing index with the smallest number of shards. --timeoutstring- The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. By default, Elasticsearch waits for at least one minute before failing. The actual wait time could be longer, particularly when multiple waits occur.
--wait-for-active-shardsnumber- The number of shard copies that must be active before proceeding with the operation. Set it to
allor any positive integer up to the total number of shards in the index (number_of_replicas+1). The default value is one, which means it waits for each primary shard to be active. --[no-]wait-for-completion- If
true, the request blocks until the operation is complete. --[no-]require-alias- If
true, the destination must be an index alias. --conflictsstring- Indicates whether to continue reindexing even when there are conflicts.
--max-docsnumber- The maximum number of documents to reindex. By default, all documents are reindexed. If it is a value less then or equal to
scroll_size, a scroll will not be used to retrieve the results for the operation. Ifconflictsis set toproceed, the reindex operation could attempt to reindex more documents from the source thanmax_docsuntil it has successfully indexedmax_docsdocuments into the target or it has gone through every document in the source query. --scriptstring- The script to run to update the document source or metadata when reindexing.
--input-filestring- path to a JSON file to use as command input
-V--[no-]version- Print the Elastic CLI version
--config-filestring- path to a config file (default: ~/.elasticrc.yml)
--use-contextstring- override the active context from the config file
--command-profilestring- restrict available commands to a deployment profile (serverless, stack, default)
--[no-]json- output as JSON
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--[no-]dry-run-
validate all inputs and exit without performing any action (preview changes without applying them)