Class DeleteByQueryRequest.Builder

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

public static class DeleteByQueryRequest.Builder
extends RequestBase.AbstractBuilder<DeleteByQueryRequest.Builder>
implements ObjectBuilder<DeleteByQueryRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • allowNoIndices

      public final DeleteByQueryRequest.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

    • analyzeWildcard

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

      API name: analyze_wildcard

    • analyzer

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

      API name: analyzer

    • conflicts

      public final DeleteByQueryRequest.Builder conflicts​(@Nullable Conflicts value)
      What to do when the delete by query hits version conflicts?

      API name: conflicts

    • defaultOperator

      public final DeleteByQueryRequest.Builder defaultOperator​(@Nullable Operator value)
      The default operator for query string query (AND or OR)

      API name: default_operator

    • df

      public final DeleteByQueryRequest.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 final DeleteByQueryRequest.Builder expandWildcards​(java.util.List<ExpandWildcard> list)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      public final DeleteByQueryRequest.Builder expandWildcards​(ExpandWildcard value, ExpandWildcard... values)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • from

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

      API name: from

    • ignoreUnavailable

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

      API name: ignore_unavailable

    • index

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

      Adds all elements of list to index.

    • index

      public final DeleteByQueryRequest.Builder index​(java.lang.String value, java.lang.String... values)
      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

      Adds one or more values to index.

    • lenient

      public final DeleteByQueryRequest.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

    • maxDocs

      public final DeleteByQueryRequest.Builder maxDocs​(@Nullable java.lang.Long value)
      API name: max_docs
    • preference

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

      API name: preference

    • q

      public final DeleteByQueryRequest.Builder q​(@Nullable java.lang.String value)
      Query in the Lucene query string syntax

      API name: q

    • query

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

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

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

      API name: refresh

    • requestCache

      public final DeleteByQueryRequest.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 final DeleteByQueryRequest.Builder requestsPerSecond​(@Nullable java.lang.Float value)
      The throttle for this request in sub-requests per second. -1 means no throttle.

      API name: requests_per_second

    • routing

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

      API name: routing

    • scroll

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

      API name: scroll

    • scroll

      public final DeleteByQueryRequest.Builder scroll​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Specify how long a consistent view of the index should be maintained for scrolled search

      API name: scroll

    • scrollSize

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

      API name: scroll_size

    • searchTimeout

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

      API name: search_timeout

    • searchTimeout

      public final DeleteByQueryRequest.Builder searchTimeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Explicit timeout for each search request. Defaults to no timeout.

      API name: search_timeout

    • searchType

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

      API name: search_type

    • slice

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

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

      public final DeleteByQueryRequest.Builder slices​(@Nullable Slices 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

    • slices

      public final DeleteByQueryRequest.Builder slices​(java.util.function.Function<Slices.Builder,​ObjectBuilder<Slices>> fn)
      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 DeleteByQueryRequest.Builder sort​(java.util.List<java.lang.String> list)
      A comma-separated list of <field>:<direction> pairs

      API name: sort

      Adds all elements of list to sort.

    • sort

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

      API name: sort

      Adds one or more values to sort.

    • stats

      public final DeleteByQueryRequest.Builder stats​(java.util.List<java.lang.String> list)
      Specific 'tag' of the request for logging and statistical purposes

      API name: stats

      Adds all elements of list to stats.

    • stats

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

      API name: stats

      Adds one or more values to stats.

    • terminateAfter

      public final DeleteByQueryRequest.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 final DeleteByQueryRequest.Builder timeout​(@Nullable Time value)
      Time each individual bulk request should wait for shards that are unavailable.

      API name: timeout

    • timeout

      public final DeleteByQueryRequest.Builder timeout​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      Time each individual bulk request should wait for shards that are unavailable.

      API name: timeout

    • version

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

      API name: version

    • waitForActiveShards

      public final DeleteByQueryRequest.Builder waitForActiveShards​(@Nullable WaitForActiveShards value)
      Sets the number of shard copies that must be active before proceeding with the delete 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

    • waitForActiveShards

      public final DeleteByQueryRequest.Builder waitForActiveShards​(java.util.function.Function<WaitForActiveShards.Builder,​ObjectBuilder<WaitForActiveShards>> fn)
      Sets the number of shard copies that must be active before proceeding with the delete 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 final DeleteByQueryRequest.Builder waitForCompletion​(@Nullable java.lang.Boolean value)
      Should the request should block until the delete by query is complete.

      API name: wait_for_completion

    • self

      protected DeleteByQueryRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<DeleteByQueryRequest.Builder>
    • build

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