Class UpdateByQueryRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.UpdateByQueryRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class UpdateByQueryRequest extends RequestBase implements JsonpSerializable
Performs an update on every document in the index without changing the source, for example to pick up a mapping change.
See Also:
  • Field Details

  • Method Details

    • of

    • allowNoIndices

      @Nullable public final Boolean allowNoIndices()
      Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

      API name: allow_no_indices

    • analyzeWildcard

      @Nullable public final Boolean analyzeWildcard()
      Specify whether wildcard and prefix queries should be analyzed (default: false)

      API name: analyze_wildcard

    • analyzer

      @Nullable public final String analyzer()
      The analyzer to use for the query string

      API name: analyzer

    • conflicts

      @Nullable public final Conflicts conflicts()
      API name: conflicts
    • defaultOperator

      @Nullable public final Operator defaultOperator()
      The default operator for query string query (AND or OR)

      API name: default_operator

    • df

      @Nullable public final String df()
      The field to use as default where no field prefix is given in the query string

      API name: df

    • expandWildcards

      public final List<ExpandWildcard> expandWildcards()
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • from

      @Nullable public final Long from()
      Starting offset (default: 0)

      API name: from

    • ignoreUnavailable

      @Nullable public final Boolean ignoreUnavailable()
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • index

      public final List<String> index()
      Required - A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices

      API name: index

    • lenient

      @Nullable public final Boolean lenient()
      Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

      API name: lenient

    • maxDocs

      @Nullable public final Long maxDocs()
      API name: max_docs
    • pipeline

      @Nullable public final String pipeline()
      Ingest pipeline to set on index requests made by this action. (default: none)

      API name: pipeline

    • preference

      @Nullable public final String preference()
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • query

      @Nullable public final Query query()
      API name: query
    • refresh

      @Nullable public final Boolean refresh()
      Should the affected indexes be refreshed?

      API name: refresh

    • requestCache

      @Nullable public final Boolean requestCache()
      Specify if request cache should be used for this request or not, defaults to index level setting

      API name: request_cache

    • requestsPerSecond

      @Nullable public final Float requestsPerSecond()
      The throttle to set on this request in sub-requests per second. -1 means no throttle.

      API name: requests_per_second

    • routing

      @Nullable public final String routing()
      A comma-separated list of specific routing values

      API name: routing

    • script

      @Nullable public final Script script()
      API name: script
    • scroll

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

      API name: scroll

    • scrollSize

      @Nullable public final Long scrollSize()
      Size on the scroll request powering the update by query

      API name: scroll_size

    • searchTimeout

      @Nullable public final Time searchTimeout()
      Explicit timeout for each search request. Defaults to no timeout.

      API name: search_timeout

    • searchType

      @Nullable public final SearchType searchType()
      Search operation type

      API name: search_type

    • slice

      @Nullable public final SlicedScroll slice()
      API name: slice
    • slices

      @Nullable public final Slices 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 auto.

      API name: slices

    • sort

      public final List<String> sort()
      A comma-separated list of <field>:<direction> pairs

      API name: sort

    • stats

      public final List<String> stats()
      Specific 'tag' of the request for logging and statistical purposes

      API name: stats

    • terminateAfter

      @Nullable public final Long terminateAfter()
      The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

      API name: terminate_after

    • timeout

      @Nullable public final Time timeout()
      Time each individual bulk request should wait for shards that are unavailable.

      API name: timeout

    • version

      @Nullable public final Boolean version()
      Specify whether to return document version as part of a hit

      API name: version

    • versionType

      @Nullable public final Boolean versionType()
      Should the document increment the version number (internal) on hit or not (reindex)

      API name: version_type

    • waitForActiveShards

      @Nullable public final WaitForActiveShards waitForActiveShards()
      Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to all for 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 Boolean waitForCompletion()
      Should the request should block until the update by query 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)
    • setupUpdateByQueryRequestDeserializer

      protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer<UpdateByQueryRequest.Builder> op)