Class ReindexRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.core.ReindexRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class ReindexRequest extends RequestBase implements JsonpSerializable
Allows to copy documents from one index to another, optionally filtering the source documents by a query, changing the destination index settings, or fetching the documents from a remote cluster.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReindexRequest.BuilderBuilder forReindexRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<ReindexRequest>_DESERIALIZERJson deserializer forReindexRequeststatic Endpoint<ReindexRequest,ReindexResponse,ErrorResponse>_ENDPOINTEndpoint "reindex".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Conflictsconflicts()API name:conflictsDestinationdest()API name:destjava.lang.LongmaxDocs()API name:max_docsstatic ReindexRequestof(java.util.function.Function<ReindexRequest.Builder,ObjectBuilder<ReindexRequest>> fn)java.lang.Booleanrefresh()Should the affected indexes be refreshed?java.lang.LongrequestsPerSecond()The throttle to set on this request in sub-requests per second.java.lang.BooleanrequireAlias()API name:require_aliasScriptscript()API name:scriptTimescroll()Control how long to keep the search context alivevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupReindexRequestDeserializer(ObjectDeserializer<ReindexRequest.Builder> op)java.lang.Longsize()API name:sizejava.lang.Longslices()The number of slices this task should be divided into.Sourcesource()API name:sourceTimetimeout()Time each individual bulk request should wait for shards that are unavailable.WaitForActiveShardswaitForActiveShards()Sets the number of shard copies that must be active before proceeding with the reindex operation.java.lang.BooleanwaitForCompletion()Should the request should block until the reindex is complete.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<ReindexRequest> _DESERIALIZER
Json deserializer forReindexRequest
-
_ENDPOINT
public static final Endpoint<ReindexRequest,ReindexResponse,ErrorResponse> _ENDPOINT
Endpoint "reindex".
-
-
Method Detail
-
of
public static ReindexRequest of(java.util.function.Function<ReindexRequest.Builder,ObjectBuilder<ReindexRequest>> fn)
-
conflicts
@Nullable public final Conflicts conflicts()
API name:conflicts
-
dest
@Nullable public final Destination dest()
API name:dest
-
maxDocs
@Nullable public final java.lang.Long maxDocs()
API name:max_docs
-
refresh
@Nullable public final java.lang.Boolean refresh()
Should the affected indexes be refreshed?API name:
refresh
-
requestsPerSecond
@Nullable public final java.lang.Long requestsPerSecond()
The throttle to set on this request in sub-requests per second. -1 means no throttle.API name:
requests_per_second
-
requireAlias
@Nullable public final java.lang.Boolean requireAlias()
API name:require_alias
-
script
@Nullable public final Script script()
API name:script
-
scroll
@Nullable public final Time scroll()
Control how long to keep the search context aliveAPI name:
scroll
-
size
@Nullable public final java.lang.Long size()
API name:size
-
slices
@Nullable public final java.lang.Long slices()
The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to 0 forauto.API name:
slices
-
source
@Nullable public final Source source()
API name:source
-
timeout
@Nullable public final Time timeout()
Time each individual bulk request should wait for shards that are unavailable.API name:
timeout
-
waitForActiveShards
@Nullable public final WaitForActiveShards waitForActiveShards()
Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set toallfor all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)API name:
wait_for_active_shards
-
waitForCompletion
@Nullable public final java.lang.Boolean waitForCompletion()
Should the request should block until the reindex is complete.API name:
wait_for_completion
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupReindexRequestDeserializer
protected static void setupReindexRequestDeserializer(ObjectDeserializer<ReindexRequest.Builder> op)
-
-