Class ReindexRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.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.
See Also:
  • Field Details

  • Method Details

    • of

    • conflicts

      @Nullable public final Conflicts conflicts()
      Set to proceed to continue reindexing even if there are conflicts.

      API name: conflicts

    • dest

      public final Destination dest()
      Required - The destination you are copying to.

      API name: dest

    • maxDocs

      @Nullable public final Long maxDocs()
      The maximum number of documents to reindex.

      API name: max_docs

    • refresh

      @Nullable public final Boolean refresh()
      If true, the request refreshes affected shards to make this operation visible to search.

      API name: refresh

    • requestsPerSecond

      @Nullable public final Float requestsPerSecond()
      The throttle for this request in sub-requests per second. Defaults to no throttle.

      API name: requests_per_second

    • requireAlias

      @Nullable public final Boolean requireAlias()
      If true, the destination must be an index alias.

      API name: require_alias

    • script

      @Nullable public final Script script()
      The script to run to update the document source or metadata when reindexing.

      API name: script

    • scroll

      @Nullable public final Time scroll()
      Specifies how long a consistent view of the index should be maintained for scrolled search.

      API name: scroll

    • size

      @Nullable public final Long size()
      API name: size
    • slices

      @Nullable public final Slices slices()
      The number of slices this task should be divided into. Defaults to 1 slice, meaning the task isn’t sliced into subtasks.

      API name: slices

    • source

      public final Source source()
      Required - The source you are copying from.

      API name: source

    • timeout

      @Nullable public final Time timeout()
      Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.

      API name: timeout

    • waitForActiveShards

      @Nullable public final WaitForActiveShards waitForActiveShards()
      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).

      API name: wait_for_active_shards

    • waitForCompletion

      @Nullable public final Boolean waitForCompletion()
      If true, the request blocks until the operation 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:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupReindexRequestDeserializer

      protected static void setupReindexRequestDeserializer(ObjectDeserializer<ReindexRequest.Builder> op)