Class UpdateByQueryRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.UpdateByQueryRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class UpdateByQueryRequest
extends RequestBase
implements JsonpSerializable
Performs an update on every document in the index without changing the
source, for example to pick up a mapping change.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<UpdateByQueryRequest>
Json deserializer forUpdateByQueryRequest
static final Endpoint<UpdateByQueryRequest,
UpdateByQueryResponse, ErrorResponse> Endpoint "update_by_query
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Whether to ignore if a wildcard indices expression resolves into no concrete indices.final String
analyzer()
The analyzer to use for the query stringfinal Boolean
Specify whether wildcard and prefix queries should be analyzed (default: false)final Conflicts
API name:conflicts
final Operator
The default operator for query string query (AND or OR)final String
df()
The field to use as default where no field prefix is given in the query stringfinal List<ExpandWildcard>
Whether to expand wildcard expression to concrete indices that are open, closed or both.final Long
from()
Starting offset (default: 0)final Boolean
Whether specified concrete indices should be ignored when unavailable (missing or closed)index()
Required - A comma-separated list of index names to search; use_all
or empty string to perform the operation on all indicesfinal Boolean
lenient()
Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredfinal Long
maxDocs()
API name:max_docs
static UpdateByQueryRequest
final String
pipeline()
Ingest pipeline to set on index requests made by this action.final String
Specify the node or shard the operation should be performed on (default: random)final Query
query()
API name:query
final Boolean
refresh()
Should the affected indexes be refreshed?final Boolean
Specify if request cache should be used for this request or not, defaults to index level settingfinal Long
The throttle to set on this request in sub-requests per second.final String
routing()
A comma-separated list of specific routing valuesfinal Script
script()
API name:script
final Time
scroll()
Specify how long a consistent view of the index should be maintained for scrolled searchfinal Long
Size on the scroll request powering the update by queryfinal Time
Explicit timeout for each search request.final SearchType
Search operation typevoid
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Long
size()
Deprecated, please usemax_docs
insteadfinal SlicedScroll
slice()
API name:slice
final Slices
slices()
The number of slices this task should be divided into.sort()
A comma-separated list of <field>:<direction> pairsstats()
Specific 'tag' of the request for logging and statistical purposesfinal Long
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.final Time
timeout()
Time each individual bulk request should wait for shards that are unavailable.type()
A comma-separated list of document types to search; leave empty to perform the operation on all typesfinal Boolean
version()
Specify whether to return document version as part of a hitfinal Boolean
Should the document increment the version number (internal) on hit or not (reindex)final WaitForActiveShards
Sets the number of shard copies that must be active before proceeding with the update by query operation.final Boolean
Should the request should block until the update by query operation is complete.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forUpdateByQueryRequest
-
_ENDPOINT
Endpoint "update_by_query
".
-
-
Method Details
-
of
public static UpdateByQueryRequest of(Function<UpdateByQueryRequest.Builder, ObjectBuilder<UpdateByQueryRequest>> fn) -
allowNoIndices
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
Specify whether wildcard and prefix queries should be analyzed (default: false)API name:
analyze_wildcard
-
analyzer
The analyzer to use for the query stringAPI name:
analyzer
-
conflicts
API name:conflicts
-
defaultOperator
The default operator for query string query (AND or OR)API name:
default_operator
-
df
The field to use as default where no field prefix is given in the query stringAPI name:
df
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
from
Starting offset (default: 0)API name:
from
-
index
Required - A comma-separated list of index names to search; use_all
or empty string to perform the operation on all indicesAPI name:
index
-
lenient
Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredAPI name:
lenient
-
maxDocs
API name:max_docs
-
pipeline
Ingest pipeline to set on index requests made by this action. (default: none)API name:
pipeline
-
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
query
API name:query
-
refresh
Should the affected indexes be refreshed?API name:
refresh
-
requestCache
Specify if request cache should be used for this request or not, defaults to index level settingAPI name:
request_cache
-
requestsPerSecond
The throttle to set on this request in sub-requests per second. -1 means no throttle.API name:
requests_per_second
-
routing
A comma-separated list of specific routing valuesAPI name:
routing
-
script
API name:script
-
scroll
Specify how long a consistent view of the index should be maintained for scrolled searchAPI name:
scroll
-
scrollSize
Size on the scroll request powering the update by queryAPI name:
scroll_size
-
searchTimeout
Explicit timeout for each search request. Defaults to no timeout.API name:
search_timeout
-
searchType
Search operation typeAPI name:
search_type
-
size
Deprecated, please usemax_docs
insteadAPI name:
size
-
slice
API name:slice
-
slices
The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set toauto
.API name:
slices
-
sort
A comma-separated list of <field>:<direction> pairsAPI name:
sort
-
stats
Specific 'tag' of the request for logging and statistical purposesAPI name:
stats
-
terminateAfter
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.API name:
terminate_after
-
timeout
Time each individual bulk request should wait for shards that are unavailable.API name:
timeout
-
type
A comma-separated list of document types to search; leave empty to perform the operation on all typesAPI name:
type
-
version
Specify whether to return document version as part of a hitAPI name:
version
-
versionType
Should the document increment the version number (internal) on hit or not (reindex)API name:
version_type
-
waitForActiveShards
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 toall
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
Should the request should block until the update by query operation is complete.API name:
wait_for_completion
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupUpdateByQueryRequestDeserializer
protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer<UpdateByQueryRequest.Builder> op)
-