java.lang.Object
org.springframework.data.elasticsearch.core.query.DeleteQuery.Builder
Enclosing class:
DeleteQuery

public static final class DeleteQuery.Builder extends Object
  • Method Details

    • withLuceneQuery

      public DeleteQuery.Builder withLuceneQuery(@Nullable String luceneQuery)
      Query in the Lucene query string syntax.
    • withAnalyzeWildcard

      public DeleteQuery.Builder withAnalyzeWildcard(@Nullable Boolean analyzeWildcard)
      If true, wildcard and prefix queries are analyzed. Defaults to false. This parameter can only be used when the lucene query q parameter is specified.
    • withAnalyzer

      public DeleteQuery.Builder withAnalyzer(@Nullable String analyzer)
      Analyzer to use for the query string. This parameter can only be used when the lucene query q parameter is specified.
    • withDefaultOperator

      public DeleteQuery.Builder withDefaultOperator(@Nullable OperatorType defaultOperator)
      The default operator for a query string query: AND or OR. Defaults to OR. This parameter can only be used when the lucene query q parameter is specified.
    • withDefaultField

      public DeleteQuery.Builder withDefaultField(@Nullable String defaultField)
      Field to be used as the default when no field prefix is specified in the query string. This parameter can only be used when the lucene query q parameter is specified.

      e.g: {"query":{"prefix":{"user.name":{"value":"es"}}}}

    • withLenient

      public DeleteQuery.Builder withLenient(@Nullable Boolean lenient)
      If a query contains errors related to the format of the data being entered, they will be disregarded unless specified otherwise. By default, this feature is turned off.
    • withAllowNoIndices

      public DeleteQuery.Builder withAllowNoIndices(@Nullable Boolean allowNoIndices)
      An error will occur if the condition is false and any of the following are true: a wildcard expression, an index alias, or the _all value only targets missing or closed indices. By default, this is set to true.
    • withConflicts

      public DeleteQuery.Builder withConflicts(@Nullable ConflictsType conflicts)
      Define the types of conflicts that occur when a query encounters version conflicts: abort or proceed. Defaults to abort.
    • setExpandWildcards

      public DeleteQuery.Builder setExpandWildcards(@Nullable EnumSet<IndicesOptions.WildcardStates> expandWildcards)
      Type of index that wildcard patterns can match. Defaults to open.
    • withIgnoreUnavailable

      public DeleteQuery.Builder withIgnoreUnavailable(@Nullable Boolean ignoreUnavailable)
      An error occurs if it is directed at an index that is missing or closed when it is false. By default, this is set to false.
    • withMaxDocs

      public DeleteQuery.Builder withMaxDocs(@Nullable Long maxDocs)
      Maximum number of documents to process. Defaults to all documents.
    • withPreference

      public DeleteQuery.Builder withPreference(@Nullable String preference)
      Specifies the node or shard the operation should be performed on.
    • withRequestCache

      public DeleteQuery.Builder withRequestCache(@Nullable Boolean requestCache)
      Use the request cache when it is true. By default, use the index-level setting.
    • withRefresh

      public DeleteQuery.Builder withRefresh(@Nullable Boolean refresh)
      Refreshes all shards involved in the deleting by query after the request completes when it is true. By default, this is set to false.
    • withRequestsPerSecond

      public DeleteQuery.Builder withRequestsPerSecond(@Nullable Float requestsPerSecond)
      Limited this request to a certain number of sub-requests per second. By default, this is set to -1 (no throttle).
    • withRouting

      public DeleteQuery.Builder withRouting(@Nullable String routing)
      Custom value used to route operations to a specific shard.
    • withScrollTime

      public DeleteQuery.Builder withScrollTime(@Nullable Duration scrollTime)
      Period to retain the search context for scrolling.
    • withScrollSize

      public DeleteQuery.Builder withScrollSize(@Nullable Long scrollSize)
      Size of the scroll request that powers the operation. By default, this is set to 1000.
    • withSearchType

      public DeleteQuery.Builder withSearchType(@Nullable Query.SearchType searchType)
      The type of the search operation.
    • withSearchTimeout

      public DeleteQuery.Builder withSearchTimeout(@Nullable Duration searchTimeout)
      Explicit timeout for each search request. By default, this is set to no timeout.
    • withSlices

      public DeleteQuery.Builder withSlices(@Nullable Integer slices)
      The number of slices this task should be divided into. By default, this is set to 1 meaning the task isn’t sliced into subtasks.
    • withSort

      public DeleteQuery.Builder withSort(@Nullable Sort sort)
      Sort search results in a specific order.
    • withStats

      public DeleteQuery.Builder withStats(@Nullable List<String> stats)
      Specific tag of the request for logging and statistical purposes.
    • withTerminateAfter

      public DeleteQuery.Builder withTerminateAfter(@Nullable Long terminateAfter)
      The Maximum number of documents that can be collected for each shard. If a query exceeds this limit, Elasticsearch will stop the query.
    • withTimeout

      public DeleteQuery.Builder withTimeout(@Nullable Duration timeout)
      Period each deletion request waits for active shards. By default, this is set to 1m (one minute).
    • withVersion

      public DeleteQuery.Builder withVersion(@Nullable Boolean version)
      Returns the document version as part of a hit.
    • build

      public DeleteQuery build()