Class DeleteQuery.Builder
java.lang.Object
org.springframework.data.elasticsearch.core.query.DeleteQuery.Builder
- Enclosing class:
DeleteQuery
- Since:
- 5.3
- Author:
- Aouichaoui Youssef
-
Method Summary
Modifier and TypeMethodDescriptionbuild()setExpandWildcards(@Nullable EnumSet<IndicesOptions.WildcardStates> expandWildcards) Type of index that wildcard patterns can match.withAllowNoIndices(@Nullable Boolean allowNoIndices) An error will occur if the condition isfalseand any of the following are true: a wildcard expression, an index alias, or the _all value only targets missing or closed indices.withAnalyzer(@Nullable String analyzer) Analyzer to use for the query string.withAnalyzeWildcard(@Nullable Boolean analyzeWildcard) If true, wildcard and prefix queries are analyzed.withConflicts(@Nullable ConflictsType conflicts) Define the types of conflicts that occur when a query encounters version conflicts: abort or proceed.withDefaultField(@Nullable String defaultField) Field to be used as the default when no field prefix is specified in the query string.withDefaultOperator(@Nullable OperatorType defaultOperator) The default operator for a query string query: AND or OR.withIgnoreUnavailable(@Nullable Boolean ignoreUnavailable) An error occurs if it is directed at an index that is missing or closed when it isfalse.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.withLuceneQuery(@Nullable String luceneQuery) Query in the Lucene query string syntax.withMaxDocs(@Nullable Long maxDocs) Maximum number of documents to process.withPreference(@Nullable String preference) Specifies the node or shard the operation should be performed on.withRefresh(@Nullable Boolean refresh) Refreshes all shards involved in the deleting by query after the request completes when it istrue.withRequestCache(@Nullable Boolean requestCache) Use the request cache when it istrue.withRequestsPerSecond(@Nullable Float requestsPerSecond) Limited this request to a certain number of sub-requests per second.withRouting(@Nullable String routing) Custom value used to route operations to a specific shard.withScrollSize(@Nullable Long scrollSize) Size of the scroll request that powers the operation.withScrollTime(@Nullable Duration scrollTime) Period to retain the search context for scrolling.withSearchTimeout(@Nullable Duration searchTimeout) Explicit timeout for each search request.withSearchType(@Nullable Query.SearchType searchType) The type of the search operation.withSlices(@Nullable Integer slices) The number of slices this task should be divided into.Sort search results in a specific order.Specifictagof the request for logging and statistical purposes.withTerminateAfter(@Nullable Long terminateAfter) The Maximum number of documents that can be collected for each shard.withTimeout(@Nullable Duration timeout) Period each deletion request waits for active shards.withVersion(@Nullable Boolean version) Returns the document version as part of a hit.
-
Method Details
-
withLuceneQuery
Query in the Lucene query string syntax. -
withAnalyzeWildcard
If true, wildcard and prefix queries are analyzed. Defaults to false. This parameter can only be used when the lucene queryqparameter is specified. -
withAnalyzer
Analyzer to use for the query string. This parameter can only be used when the lucene queryqparameter is specified. -
withDefaultOperator
The default operator for a query string query: AND or OR. Defaults to OR. This parameter can only be used when the lucene queryqparameter is specified. -
withDefaultField
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 queryqparameter is specified.e.g:
{"query":{"prefix":{"user.name":{"value":"es"}}}} -
withLenient
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
An error will occur if the condition isfalseand 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 totrue. -
withConflicts
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. -
withMaxDocs
Maximum number of documents to process. Defaults to all documents. -
withPreference
Specifies the node or shard the operation should be performed on. -
withRequestCache
Use the request cache when it istrue. By default, use the index-level setting. -
withRefresh
Refreshes all shards involved in the deleting by query after the request completes when it istrue. By default, this is set tofalse. -
withRequestsPerSecond
Limited this request to a certain number of sub-requests per second. By default, this is set to-1(no throttle). -
withRouting
Custom value used to route operations to a specific shard. -
withScrollTime
Period to retain the search context for scrolling. -
withScrollSize
Size of the scroll request that powers the operation. By default, this is set to1000. -
withSearchType
The type of the search operation. -
withSearchTimeout
Explicit timeout for each search request. By default, this is set to no timeout. -
withSlices
The number of slices this task should be divided into. By default, this is set to1meaning the task isn’t sliced into subtasks. -
withSort
Sort search results in a specific order. -
withStats
Specifictagof the request for logging and statistical purposes. -
withTerminateAfter
The Maximum number of documents that can be collected for each shard. If a query exceeds this limit, Elasticsearch will stop the query. -
withTimeout
Period each deletion request waits for active shards. By default, this is set to1m(one minute). -
withVersion
Returns the document version as part of a hit. -
build
-