Class ReindexRequest.Builder
- All Implemented Interfaces:
WithJson<ReindexRequest.Builder>
,ObjectBuilder<ReindexRequest>
- Enclosing class:
- ReindexRequest
ReindexRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aReindexRequest
.final ReindexRequest.Builder
Indicates whether to continue reindexing even when there are conflicts.final ReindexRequest.Builder
dest
(Destination value) Required - The destination you are copying to.final ReindexRequest.Builder
Required - The destination you are copying to.final ReindexRequest.Builder
The maximum number of documents to reindex.final ReindexRequest.Builder
Iftrue
, the request refreshes affected shards to make this operation visible to search.final ReindexRequest.Builder
requestsPerSecond
(Float value) The throttle for this request in sub-requests per second.final ReindexRequest.Builder
requireAlias
(Boolean value) Iftrue
, the destination must be an index alias.final ReindexRequest.Builder
The script to run to update the document source or metadata when reindexing.final ReindexRequest.Builder
The script to run to update the document source or metadata when reindexing.final ReindexRequest.Builder
The period of time that a consistent view of the index should be maintained for scrolled search.final ReindexRequest.Builder
The period of time that a consistent view of the index should be maintained for scrolled search.protected ReindexRequest.Builder
self()
final ReindexRequest.Builder
API name:size
final ReindexRequest.Builder
The number of slices this task should be divided into.final ReindexRequest.Builder
The number of slices this task should be divided into.final ReindexRequest.Builder
Required - The source you are copying from.final ReindexRequest.Builder
Required - The source you are copying from.final ReindexRequest.Builder
The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.final ReindexRequest.Builder
The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.final ReindexRequest.Builder
The number of shard copies that must be active before proceeding with the operation.final ReindexRequest.Builder
The number of shard copies that must be active before proceeding with the operation.final ReindexRequest.Builder
waitForCompletion
(Boolean value) Iftrue
, the request blocks until the operation is complete.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
conflicts
Indicates whether to continue reindexing even when there are conflicts.API name:
conflicts
-
dest
Required - The destination you are copying to.API name:
dest
-
dest
public final ReindexRequest.Builder dest(Function<Destination.Builder, ObjectBuilder<Destination>> fn) Required - The destination you are copying to.API name:
dest
-
maxDocs
The maximum number of documents to reindex. By default, all documents are reindexed. If it is a value less then or equal toscroll_size
, a scroll will not be used to retrieve the results for the operation.If
conflicts
is set toproceed
, the reindex operation could attempt to reindex more documents from the source thanmax_docs
until it has successfully indexedmax_docs
documents into the target or it has gone through every document in the source query.API name:
max_docs
-
refresh
Iftrue
, the request refreshes affected shards to make this operation visible to search.API name:
refresh
-
requestsPerSecond
The throttle for this request in sub-requests per second. By default, there is no throttle.API name:
requests_per_second
-
requireAlias
Iftrue
, the destination must be an index alias.API name:
require_alias
-
script
The script to run to update the document source or metadata when reindexing.API name:
script
-
script
The script to run to update the document source or metadata when reindexing.API name:
script
-
scroll
The period of time that a consistent view of the index should be maintained for scrolled search.API name:
scroll
-
scroll
The period of time that a consistent view of the index should be maintained for scrolled search.API name:
scroll
-
size
API name:size
-
slices
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.API name:
slices
-
slices
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.API name:
slices
-
source
Required - The source you are copying from.API name:
source
-
source
Required - The source you are copying from.API name:
source
-
timeout
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.API name:
timeout
-
timeout
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.API name:
timeout
-
waitForActiveShards
The number of shard copies that must be active before proceeding with the operation. Set it toall
or 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.API name:
wait_for_active_shards
-
waitForActiveShards
public final ReindexRequest.Builder waitForActiveShards(Function<WaitForActiveShards.Builder, ObjectBuilder<WaitForActiveShards>> fn) The number of shard copies that must be active before proceeding with the operation. Set it toall
or 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.API name:
wait_for_active_shards
-
waitForCompletion
Iftrue
, the request blocks until the operation is complete.API name:
wait_for_completion
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<ReindexRequest.Builder>
-
build
Builds aReindexRequest
.- Specified by:
build
in interfaceObjectBuilder<ReindexRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-