Class UpdateByQueryRequest.Builder

java.lang.Object
co.elastic.clients.elasticsearch._core.UpdateByQueryRequest.Builder
All Implemented Interfaces:
ObjectBuilder<UpdateByQueryRequest>
Enclosing class:
UpdateByQueryRequest

public static class UpdateByQueryRequest.Builder
extends java.lang.Object
implements ObjectBuilder<UpdateByQueryRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • index

      public UpdateByQueryRequest.Builder index​(java.util.List<java.lang.String> value)
      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

    • index

      public UpdateByQueryRequest.Builder index​(java.lang.String... value)
      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

    • addIndex

      public UpdateByQueryRequest.Builder addIndex​(java.lang.String value)
      Add a value to index(List), creating the list if needed.
    • type

      public UpdateByQueryRequest.Builder type​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of document types to search; leave empty to perform the operation on all types

      API name: type

    • type

      public UpdateByQueryRequest.Builder type​(java.lang.String... value)
      A comma-separated list of document types to search; leave empty to perform the operation on all types

      API name: type

    • addType

      public UpdateByQueryRequest.Builder addType​(java.lang.String value)
      Add a value to type(List), creating the list if needed.
    • allowNoIndices

      public UpdateByQueryRequest.Builder allowNoIndices​(@Nullable java.lang.Boolean value)
      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

    • analyzer

      public UpdateByQueryRequest.Builder analyzer​(@Nullable java.lang.String value)
      The analyzer to use for the query string

      API name: analyzer

    • analyzeWildcard

      public UpdateByQueryRequest.Builder analyzeWildcard​(@Nullable java.lang.Boolean value)
      Specify whether wildcard and prefix queries should be analyzed (default: false)

      API name: analyze_wildcard

    • defaultOperator

      public UpdateByQueryRequest.Builder defaultOperator​(@Nullable DefaultOperator value)
      The default operator for query string query (AND or OR)

      API name: default_operator

    • df

      public UpdateByQueryRequest.Builder df​(@Nullable java.lang.String value)
      The field to use as default where no field prefix is given in the query string

      API name: df

    • expandWildcards

      public UpdateByQueryRequest.Builder expandWildcards​(@Nullable java.util.List<ExpandWildcardOptions> value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • expandWildcards

      public UpdateByQueryRequest.Builder expandWildcards​(ExpandWildcardOptions... value)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

    • addExpandWildcards

      public UpdateByQueryRequest.Builder addExpandWildcards​(ExpandWildcardOptions value)
      Add a value to expandWildcards(List), creating the list if needed.
    • from

      public UpdateByQueryRequest.Builder from​(@Nullable java.lang.Long value)
      Starting offset (default: 0)

      API name: from

    • ignoreUnavailable

      public UpdateByQueryRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      Whether specified concrete indices should be ignored when unavailable (missing or closed)

      API name: ignore_unavailable

    • lenient

      public UpdateByQueryRequest.Builder lenient​(@Nullable java.lang.Boolean value)
      Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

      API name: lenient

    • pipeline

      public UpdateByQueryRequest.Builder pipeline​(@Nullable java.lang.String value)
      Ingest pipeline to set on index requests made by this action. (default: none)

      API name: pipeline

    • preference

      public UpdateByQueryRequest.Builder preference​(@Nullable java.lang.String value)
      Specify the node or shard the operation should be performed on (default: random)

      API name: preference

    • refresh

      public UpdateByQueryRequest.Builder refresh​(@Nullable java.lang.Boolean value)
      Should the affected indexes be refreshed?

      API name: refresh

    • requestCache

      public UpdateByQueryRequest.Builder requestCache​(@Nullable java.lang.Boolean value)
      Specify if request cache should be used for this request or not, defaults to index level setting

      API name: request_cache

    • requestsPerSecond

      public UpdateByQueryRequest.Builder requestsPerSecond​(@Nullable java.lang.Long value)
      The throttle to set on this request in sub-requests per second. -1 means no throttle.

      API name: requests_per_second

    • routing

      public UpdateByQueryRequest.Builder routing​(@Nullable java.lang.String value)
      A comma-separated list of specific routing values

      API name: routing

    • scroll

      public UpdateByQueryRequest.Builder scroll​(@Nullable java.lang.String value)
      Specify how long a consistent view of the index should be maintained for scrolled search

      API name: scroll

    • scrollSize

      public UpdateByQueryRequest.Builder scrollSize​(@Nullable java.lang.Long value)
      Size on the scroll request powering the update by query

      API name: scroll_size

    • searchTimeout

      public UpdateByQueryRequest.Builder searchTimeout​(@Nullable java.lang.String value)
      Explicit timeout for each search request. Defaults to no timeout.

      API name: search_timeout

    • searchType

      public UpdateByQueryRequest.Builder searchType​(@Nullable SearchType value)
      Search operation type

      API name: search_type

    • size

      public UpdateByQueryRequest.Builder size​(@Nullable java.lang.Long value)
      Deprecated, please use max_docs instead

      API name: size

    • slices

      public UpdateByQueryRequest.Builder slices​(@Nullable java.lang.Long value)
      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 UpdateByQueryRequest.Builder sort​(@Nullable java.util.List<java.lang.String> value)
      A comma-separated list of <field>:<direction> pairs

      API name: sort

    • sort

      public UpdateByQueryRequest.Builder sort​(java.lang.String... value)
      A comma-separated list of <field>:<direction> pairs

      API name: sort

    • addSort

      public UpdateByQueryRequest.Builder addSort​(java.lang.String value)
      Add a value to sort(List), creating the list if needed.
    • source

      public UpdateByQueryRequest.Builder source​(@Nullable jakarta.json.JsonValue value)
      True or false to return the _source field or not, or a list of fields to return

      API name: _source

    • sourceExcludes

      public UpdateByQueryRequest.Builder sourceExcludes​(@Nullable java.util.List<java.lang.String> value)
      A list of fields to exclude from the returned _source field

      API name: _source_excludes

    • sourceExcludes

      public UpdateByQueryRequest.Builder sourceExcludes​(java.lang.String... value)
      A list of fields to exclude from the returned _source field

      API name: _source_excludes

    • addSourceExcludes

      public UpdateByQueryRequest.Builder addSourceExcludes​(java.lang.String value)
      Add a value to sourceExcludes(List), creating the list if needed.
    • sourceIncludes

      public UpdateByQueryRequest.Builder sourceIncludes​(@Nullable java.util.List<java.lang.String> value)
      A list of fields to extract and return from the _source field

      API name: _source_includes

    • sourceIncludes

      public UpdateByQueryRequest.Builder sourceIncludes​(java.lang.String... value)
      A list of fields to extract and return from the _source field

      API name: _source_includes

    • addSourceIncludes

      public UpdateByQueryRequest.Builder addSourceIncludes​(java.lang.String value)
      Add a value to sourceIncludes(List), creating the list if needed.
    • stats

      public UpdateByQueryRequest.Builder stats​(@Nullable java.util.List<java.lang.String> value)
      Specific 'tag' of the request for logging and statistical purposes

      API name: stats

    • stats

      public UpdateByQueryRequest.Builder stats​(java.lang.String... value)
      Specific 'tag' of the request for logging and statistical purposes

      API name: stats

    • addStats

      public UpdateByQueryRequest.Builder addStats​(java.lang.String value)
      Add a value to stats(List), creating the list if needed.
    • terminateAfter

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

      API name: terminate_after

    • timeout

      public UpdateByQueryRequest.Builder timeout​(@Nullable java.lang.String value)
      Time each individual bulk request should wait for shards that are unavailable.

      API name: timeout

    • version

      public UpdateByQueryRequest.Builder version​(@Nullable java.lang.Boolean value)
      Specify whether to return document version as part of a hit

      API name: version

    • versionType

      public UpdateByQueryRequest.Builder versionType​(@Nullable java.lang.Boolean value)
      Should the document increment the version number (internal) on hit or not (reindex)

      API name: version_type

    • waitForActiveShards

      public UpdateByQueryRequest.Builder waitForActiveShards​(@Nullable jakarta.json.JsonValue value)
      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

      public UpdateByQueryRequest.Builder waitForCompletion​(@Nullable java.lang.Boolean value)
      Should the request should block until the update by query operation is complete.

      API name: wait_for_completion

    • maxDocs

      public UpdateByQueryRequest.Builder maxDocs​(@Nullable java.lang.Long value)
      API name: max_docs
    • query

      public UpdateByQueryRequest.Builder query​(@Nullable Query value)
      API name: query
    • query

      public UpdateByQueryRequest.Builder query​(java.util.function.Function<Query.Builder,​ObjectBuilder<Query>> fn)
      API name: query
    • script

      public UpdateByQueryRequest.Builder script​(@Nullable jakarta.json.JsonValue value)
      API name: script
    • slice

      public UpdateByQueryRequest.Builder slice​(@Nullable SlicedScroll value)
      API name: slice
    • slice

      public UpdateByQueryRequest.Builder slice​(java.util.function.Function<SlicedScroll.Builder,​ObjectBuilder<SlicedScroll>> fn)
      API name: slice
    • conflicts

      public UpdateByQueryRequest.Builder conflicts​(@Nullable Conflicts value)
      API name: conflicts
    • build

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