Class UpdateByQueryRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpdateByQueryRequest.BuilderBuilder forUpdateByQueryRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<UpdateByQueryRequest>_DESERIALIZERJson deserializer forUpdateByQueryRequeststatic Endpoint<UpdateByQueryRequest,UpdateByQueryResponse,ErrorResponse>_ENDPOINTEndpoint "update_by_query".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleanallowNoIndices()Whether to ignore if a wildcard indices expression resolves into no concrete indices.java.lang.Stringanalyzer()The analyzer to use for the query stringjava.lang.BooleananalyzeWildcard()Specify whether wildcard and prefix queries should be analyzed (default: false)Conflictsconflicts()API name:conflictsOperatordefaultOperator()The default operator for query string query (AND or OR)java.lang.Stringdf()The field to use as default where no field prefix is given in the query stringjava.util.List<ExpandWildcard>expandWildcards()Whether to expand wildcard expression to concrete indices that are open, closed or both.java.lang.Longfrom()Starting offset (default: 0)java.lang.BooleanignoreUnavailable()Whether specified concrete indices should be ignored when unavailable (missing or closed)java.util.List<java.lang.String>index()Required - A comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesjava.lang.Booleanlenient()Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredjava.lang.LongmaxDocs()API name:max_docsstatic UpdateByQueryRequestof(java.util.function.Function<UpdateByQueryRequest.Builder,ObjectBuilder<UpdateByQueryRequest>> fn)java.lang.Stringpipeline()Ingest pipeline to set on index requests made by this action.java.lang.Stringpreference()Specify the node or shard the operation should be performed on (default: random)Queryquery()API name:queryjava.lang.Booleanrefresh()Should the affected indexes be refreshed?java.lang.BooleanrequestCache()Specify if request cache should be used for this request or not, defaults to index level settingjava.lang.LongrequestsPerSecond()The throttle to set on this request in sub-requests per second.java.lang.Stringrouting()A comma-separated list of specific routing valuesScriptscript()API name:scriptTimescroll()Specify how long a consistent view of the index should be maintained for scrolled searchjava.lang.LongscrollSize()Size on the scroll request powering the update by queryTimesearchTimeout()Explicit timeout for each search request.SearchTypesearchType()Search operation typevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupUpdateByQueryRequestDeserializer(ObjectDeserializer<UpdateByQueryRequest.Builder> op)java.lang.Longsize()Deprecated, please usemax_docsinsteadSlicedScrollslice()API name:slicejava.lang.Longslices()The number of slices this task should be divided into.java.util.List<java.lang.String>sort()A comma-separated list of <field>:<direction> pairsSourceConfigParamsource()True or false to return the _source field or not, or a list of fields to returnjava.util.List<java.lang.String>sourceExcludes()A list of fields to exclude from the returned _source fieldjava.util.List<java.lang.String>sourceIncludes()A list of fields to extract and return from the _source fieldjava.util.List<java.lang.String>stats()Specific 'tag' of the request for logging and statistical purposesjava.lang.LongterminateAfter()The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.Timetimeout()Time each individual bulk request should wait for shards that are unavailable.java.lang.Booleanversion()Specify whether to return document version as part of a hitjava.lang.BooleanversionType()Should the document increment the version number (internal) on hit or not (reindex)WaitForActiveShardswaitForActiveShards()Sets the number of shard copies that must be active before proceeding with the update by query operation.java.lang.BooleanwaitForCompletion()Should the request should block until the update by query operation is complete.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<UpdateByQueryRequest> _DESERIALIZER
Json deserializer forUpdateByQueryRequest
-
_ENDPOINT
public static final Endpoint<UpdateByQueryRequest,UpdateByQueryResponse,ErrorResponse> _ENDPOINT
Endpoint "update_by_query".
-
-
Method Detail
-
of
public static UpdateByQueryRequest of(java.util.function.Function<UpdateByQueryRequest.Builder,ObjectBuilder<UpdateByQueryRequest>> fn)
-
source
@Nullable public final SourceConfigParam source()
True or false to return the _source field or not, or a list of fields to returnAPI name:
_source
-
sourceExcludes
public final java.util.List<java.lang.String> sourceExcludes()
A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
sourceIncludes
public final java.util.List<java.lang.String> sourceIncludes()
A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
allowNoIndices
@Nullable public final java.lang.Boolean allowNoIndices()
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices
-
analyzeWildcard
@Nullable public final java.lang.Boolean analyzeWildcard()
Specify whether wildcard and prefix queries should be analyzed (default: false)API name:
analyze_wildcard
-
analyzer
@Nullable public final java.lang.String analyzer()
The analyzer to use for the query stringAPI name:
analyzer
-
conflicts
@Nullable public final Conflicts conflicts()
API name:conflicts
-
defaultOperator
@Nullable public final Operator defaultOperator()
The default operator for query string query (AND or OR)API name:
default_operator
-
df
@Nullable public final java.lang.String df()
The field to use as default where no field prefix is given in the query stringAPI name:
df
-
expandWildcards
public final java.util.List<ExpandWildcard> expandWildcards()
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
from
@Nullable public final java.lang.Long from()
Starting offset (default: 0)API name:
from
-
ignoreUnavailable
@Nullable public final java.lang.Boolean ignoreUnavailable()
Whether specified concrete indices should be ignored when unavailable (missing or closed)API name:
ignore_unavailable
-
index
public final java.util.List<java.lang.String> index()
Required - A comma-separated list of index names to search; use_allor empty string to perform the operation on all indicesAPI name:
index
-
lenient
@Nullable public final java.lang.Boolean lenient()
Specify whether format-based query failures (such as providing text to a numeric field) should be ignoredAPI name:
lenient
-
maxDocs
@Nullable public final java.lang.Long maxDocs()
API name:max_docs
-
pipeline
@Nullable public final java.lang.String pipeline()
Ingest pipeline to set on index requests made by this action. (default: none)API name:
pipeline
-
preference
@Nullable public final java.lang.String preference()
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
query
@Nullable public final Query query()
API name:query
-
refresh
@Nullable public final java.lang.Boolean refresh()
Should the affected indexes be refreshed?API name:
refresh
-
requestCache
@Nullable public final java.lang.Boolean requestCache()
Specify if request cache should be used for this request or not, defaults to index level settingAPI name:
request_cache
-
requestsPerSecond
@Nullable public final java.lang.Long requestsPerSecond()
The throttle to set on this request in sub-requests per second. -1 means no throttle.API name:
requests_per_second
-
routing
@Nullable public final java.lang.String routing()
A comma-separated list of specific routing valuesAPI name:
routing
-
script
@Nullable public final Script script()
API name:script
-
scroll
@Nullable public final Time scroll()
Specify how long a consistent view of the index should be maintained for scrolled searchAPI name:
scroll
-
scrollSize
@Nullable public final java.lang.Long scrollSize()
Size on the scroll request powering the update by queryAPI name:
scroll_size
-
searchTimeout
@Nullable public final Time searchTimeout()
Explicit timeout for each search request. Defaults to no timeout.API name:
search_timeout
-
searchType
@Nullable public final SearchType searchType()
Search operation typeAPI name:
search_type
-
size
@Nullable public final java.lang.Long size()
Deprecated, please usemax_docsinsteadAPI name:
size
-
slice
@Nullable public final SlicedScroll slice()
API name:slice
-
slices
@Nullable public final java.lang.Long 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 to 0 forauto.API name:
slices
-
sort
public final java.util.List<java.lang.String> sort()
A comma-separated list of <field>:<direction> pairsAPI name:
sort
-
stats
public final java.util.List<java.lang.String> stats()
Specific 'tag' of the request for logging and statistical purposesAPI name:
stats
-
terminateAfter
@Nullable public final java.lang.Long 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
@Nullable public final Time timeout()
Time each individual bulk request should wait for shards that are unavailable.API name:
timeout
-
version
@Nullable public final java.lang.Boolean version()
Specify whether to return document version as part of a hitAPI name:
version
-
versionType
@Nullable public final java.lang.Boolean versionType()
Should the document increment the version number (internal) on hit or not (reindex)API name:
version_type
-
waitForActiveShards
@Nullable public final WaitForActiveShards 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 toallfor 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
@Nullable public final java.lang.Boolean waitForCompletion()
Should the request should block until the update by query operation is complete.API name:
wait_for_completion
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupUpdateByQueryRequestDeserializer
protected static void setupUpdateByQueryRequestDeserializer(ObjectDeserializer<UpdateByQueryRequest.Builder> op)
-
-