Module spring.data.elasticsearch
Class DeleteQuery.Builder
java.lang.Object
org.springframework.data.elasticsearch.core.query.DeleteQuery.Builder
- Enclosing class:
- DeleteQuery
-
Method Summary
Modifier and TypeMethodDescriptionbuild()setExpandWildcards(EnumSet<IndicesOptions.WildcardStates> expandWildcards) Type of index that wildcard patterns can match.withAllowNoIndices(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(String analyzer) Analyzer to use for the query string.withAnalyzeWildcard(Boolean analyzeWildcard) If true, wildcard and prefix queries are analyzed.withConflicts(ConflictsType conflicts) Define the types of conflicts that occur when a query encounters version conflicts: abort or proceed.withDefaultField(String defaultField) Field to be used as the default when no field prefix is specified in the query string.withDefaultOperator(OperatorType defaultOperator) The default operator for a query string query: AND or OR.withIgnoreUnavailable(Boolean ignoreUnavailable) An error occurs if it is directed at an index that is missing or closed when it isfalse.withLenient(Boolean lenient) If a query contains errors related to the format of the data being entered, they will be disregarded unless specified otherwise.withLuceneQuery(String luceneQuery) Query in the Lucene query string syntax.withMaxDocs(Long maxDocs) Maximum number of documents to process.withPreference(String preference) Specifies the node or shard the operation should be performed on.withRefresh(Boolean refresh) Refreshes all shards involved in the deleting by query after the request completes when it istrue.withRequestCache(Boolean requestCache) Use the request cache when it istrue.withRequestsPerSecond(Float requestsPerSecond) Limited this request to a certain number of sub-requests per second.withRouting(String routing) Custom value used to route operations to a specific shard.withScrollSize(Long scrollSize) Size of the scroll request that powers the operation.withScrollTime(Duration scrollTime) Period to retain the search context for scrolling.withSearchTimeout(Duration searchTimeout) Explicit timeout for each search request.withSearchType(Query.SearchType searchType) The type of the search operation.withSlices(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(Long terminateAfter) The Maximum number of documents that can be collected for each shard.withTimeout(Duration timeout) Period each deletion request waits for active shards.withVersion(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
-