Class ReindexResponse.Builder

All Implemented Interfaces:
WithJson<ReindexResponse.Builder>, ObjectBuilder<ReindexResponse>
Enclosing class:
ReindexResponse

public static class ReindexResponse.Builder extends WithJsonObjectBuilderBase<ReindexResponse.Builder> implements ObjectBuilder<ReindexResponse>
Builder for ReindexResponse.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • batches

      public final ReindexResponse.Builder batches(@Nullable Long value)
      The number of scroll responses that were pulled back by the reindex.

      API name: batches

    • created

      public final ReindexResponse.Builder created(@Nullable Long value)
      The number of documents that were successfully created.

      API name: created

    • deleted

      public final ReindexResponse.Builder deleted(@Nullable Long value)
      The number of documents that were successfully deleted.

      API name: deleted

    • failures

      public final ReindexResponse.Builder failures(List<BulkIndexByScrollFailure> list)
      If there were any unrecoverable errors during the process, it is an array of those failures. If this array is not empty, the request ended because of those failures. Reindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array. You can use the conflicts option to prevent the reindex from ending on version conflicts.

      API name: failures

      Adds all elements of list to failures.

    • failures

      If there were any unrecoverable errors during the process, it is an array of those failures. If this array is not empty, the request ended because of those failures. Reindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array. You can use the conflicts option to prevent the reindex from ending on version conflicts.

      API name: failures

      Adds one or more values to failures.

    • failures

      If there were any unrecoverable errors during the process, it is an array of those failures. If this array is not empty, the request ended because of those failures. Reindex is implemented using batches and any failure causes the entire process to end but all failures in the current batch are collected into the array. You can use the conflicts option to prevent the reindex from ending on version conflicts.

      API name: failures

      Adds a value to failures using a builder lambda.

    • noops

      public final ReindexResponse.Builder noops(@Nullable Long value)
      The number of documents that were ignored because the script used for the reindex returned a noop value for ctx.op.

      API name: noops

    • retries

      public final ReindexResponse.Builder retries(@Nullable Retries value)
      The number of retries attempted by reindex.

      API name: retries

    • retries

      The number of retries attempted by reindex.

      API name: retries

    • requestsPerSecond

      public final ReindexResponse.Builder requestsPerSecond(@Nullable Float value)
      The number of requests per second effectively run during the reindex.

      API name: requests_per_second

    • sliceId

      public final ReindexResponse.Builder sliceId(@Nullable Integer value)
      API name: slice_id
    • task

      public final ReindexResponse.Builder task(@Nullable String value)
      API name: task
    • throttledMillis

      public final ReindexResponse.Builder throttledMillis(@Nullable Long value)
      The number of milliseconds the request slept to conform to requests_per_second.

      API name: throttled_millis

    • throttledUntilMillis

      public final ReindexResponse.Builder throttledUntilMillis(@Nullable Long value)
      This field should always be equal to zero in a reindex response. It has meaning only when using the task API, where it indicates the next time (in milliseconds since epoch) that a throttled request will be run again in order to conform to requests_per_second.

      API name: throttled_until_millis

    • timedOut

      public final ReindexResponse.Builder timedOut(@Nullable Boolean value)
      If any of the requests that ran during the reindex timed out, it is true.

      API name: timed_out

    • took

      public final ReindexResponse.Builder took(@Nullable Long value)
      The total milliseconds the entire operation took.

      API name: took

    • total

      public final ReindexResponse.Builder total(@Nullable Long value)
      The number of documents that were successfully processed.

      API name: total

    • updated

      public final ReindexResponse.Builder updated(@Nullable Long value)
      The number of documents that were successfully updated. That is to say, a document with the same ID already existed before the reindex updated it.

      API name: updated

    • versionConflicts

      public final ReindexResponse.Builder versionConflicts(@Nullable Long value)
      The number of version conflicts that occurred.

      API name: version_conflicts

    • self

      protected ReindexResponse.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<ReindexResponse.Builder>
    • build

      public ReindexResponse build()
      Builds a ReindexResponse.
      Specified by:
      build in interface ObjectBuilder<ReindexResponse>
      Throws:
      NullPointerException - if some of the required fields are null.