Class UpdateByQueryRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<UpdateByQueryRequest.Builder,UpdateByQueryRequest>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<UpdateByQueryRequest> Json deserializer forUpdateByQueryRequeststatic final Endpoint<UpdateByQueryRequest, UpdateByQueryResponse, ErrorResponse> Endpoint "update_by_query". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanIffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes.final Stringanalyzer()Analyzer to use for the query string.final BooleanIftrue, wildcard and prefix queries are analyzed.protected voidapplyQueryParameters(Map<String, String> params) static UpdateByQueryRequest.Builderbuilder()final ConflictsAPI name:conflictsfinal OperatorThe default operator for query string query:ANDorOR.final Stringdf()Field to use as default where no field prefix is given in the query string.booleanfinal List<ExpandWildcard> Type of index that wildcard patterns can match.final Integerfrom()Starting offset.inthashCode()final BooleanIffalse, the request returns an error if it targets a missing or closed index.index()Required - Comma-separated list of data streams, indexes, and aliases to search.final Booleanlenient()Iftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.final IntegermaxDocs()The maximum number of documents to update.static UpdateByQueryRequestfinal Stringpipeline()ID of the pipeline to use to preprocess incoming documents.final StringSpecifies the node or shard the operation should be performed on.final Stringq()Query in the Lucene query string syntax.final Queryquery()API name:queryfinal Refreshrefresh()Iftrue, OpenSearch refreshes affected shards to make the operation visible to search.final BooleanIftrue, the request cache is used for this request.final FloatThe throttle for this request in sub-requests per second.routing()Custom value used to route operations to a specific shard.final Scriptscript()API name:scriptfinal Timescroll()Period to retain the search context for scrolling.final IntegerSize of the scroll request that powers the operation.final TimeExplicit timeout for each search request.final SearchTypeThe type of the search operation.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Integersize()Deprecated, usemax_docsinstead.final SlicedScrollslice()API name:slicefinal Slicesslices()The number of slices this task should be divided into.sort()A comma-separated list of <field>:<direction> pairs.final SourceConfigParamsource()Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.List of fields to exclude from the returned_sourcefield.List of fields to extract and return from the_sourcefield.stats()Specifictagof the request for logging and statistical purposes.final IntegerMaximum number of documents to collect for each shard.final Timetimeout()Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.Create a new builderToCopyableBuilderthat is initialised with the current state of this object.final Booleanversion()Iftrue, returns the document version as part of a hit.final WaitForActiveShardsThe number of shard copies that must be active before proceeding with the operation.final BooleanIftrue, the request blocks until the operation is complete.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase
errorTrace, humanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
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
Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targetingfoo*,bar*returns an error if an index starts withfoobut no index starts withbar.API name:
allow_no_indices -
analyzeWildcard
Iftrue, wildcard and prefix queries are analyzed.API name:
analyze_wildcard -
analyzer
Analyzer to use for the query string.API name:
analyzer -
conflicts
API name:conflicts -
defaultOperator
The default operator for query string query:ANDorOR.API name:
default_operator -
df
Field to use as default where no field prefix is given in the query string.API name:
df -
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden. Valid values are:all,open,closed,hidden,none.API name:
expand_wildcards -
from
Starting offset.API name:
from -
index
Required - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (*). To search all data streams or indexes, omit this parameter or use*or_all.API name:
index -
lenient
Iftrue, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.API name:
lenient -
maxDocs
The maximum number of documents to update.API name:
max_docs -
pipeline
ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to_nonedisables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.API name:
pipeline -
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference -
q
Query in the Lucene query string syntax.API name:
q -
query
API name:query -
refresh
Iftrue, OpenSearch refreshes affected shards to make the operation visible to search.API name:
refresh -
requestCache
Iftrue, the request cache is used for this request.API name:
request_cache -
requestsPerSecond
The throttle for this request in sub-requests per second.API name:
requests_per_second -
routing
Custom value used to route operations to a specific shard.API name:
routing -
script
API name:script -
scroll
Period to retain the search context for scrolling.API name:
scroll -
scrollSize
Size of the scroll request that powers the operation.API name:
scroll_size -
searchTimeout
Explicit timeout for each search request.API name:
search_timeout -
searchType
The type of the search operation. Available options:query_then_fetch,dfs_query_then_fetch.API name:
search_type -
size
Deprecated, usemax_docsinstead.API name:
size -
slice
API name:slice -
slices
The number of slices this task should be divided into.API name:
slices -
sort
A comma-separated list of <field>:<direction> pairs.API name:
sort -
source
Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.API name:
_source -
sourceExcludes
List of fields to exclude from the returned_sourcefield.API name:
_source_excludes -
sourceIncludes
List of fields to extract and return from the_sourcefield.API name:
_source_includes -
stats
Specifictagof the request for logging and statistical purposes.API name:
stats -
terminateAfter
Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers.API name:
terminate_after -
timeout
Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.API name:
timeout -
version
Iftrue, returns the document version as part of a hit.API name:
version -
waitForActiveShards
The number of shard copies that must be active before proceeding with the operation. Set toallor any positive integer up to the total number of shards in the index (number_of_replicas+1).API name:
wait_for_active_shards -
waitForCompletion
Iftrue, the request blocks until the operation is complete.API name:
wait_for_completion -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<UpdateByQueryRequest.Builder,UpdateByQueryRequest> - Returns:
- a new builder instance.
-
builder
-
setupUpdateByQueryRequestDeserializer
protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer<UpdateByQueryRequest.Builder> op) -
applyQueryParameters
- Overrides:
applyQueryParametersin classRequestBase
-
hashCode
public int hashCode() -
equals
-