- All Implemented Interfaces:
public class UpdateByQueryRequest extends AbstractBulkIndexByScrollRequest<UpdateByQueryRequest> implements IndicesRequest.Replaceable, ToXContentObject
Request to update some documents. That means you can't change their type, id, index, or anything like that. This implements CompositeIndicesRequest but in a misleading way. Rather than returning all the subrequests that it will make it tries to return a representative set of subrequests. This is best-effort but better than ReindexRequest because scripts can't change the destination index and things.
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Fields inherited from class org.elasticsearch.index.reindex.AbstractBulkByScrollRequest
AUTO_SLICES, AUTO_SLICES_VALUE, DEFAULT_SCROLL_SIZE, DEFAULT_SCROLL_TIMEOUT, MAX_DOCS_ALL_MATCHES, SIZE_ALL_MATCHES
Method SummaryModifier and TypeMethodDescriptionBuild a new request for a slice of the parent request.
intGets the batch size for this request
StringDeprecated.Types are in the process of being removed.Ingest pipeline to set on index requests made by this action.Gets the routing value used for this request
indices()Returns the array of indices that the action relates toSets the indices that the action relates to.Returns the indices options used to resolve indices.
self()`this` cast to Self.
(int size)The scroll size to control number of documents processed per batchDeprecated.Types are in the process of being removed.Set the IndicesOptions for controlling unavailable indicesSet the ingest pipeline to set on index requests made by this action.Set the query for selective updateSet routing limiting the process to the shards that match that routing value
Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkIndexByScrollRequest
doForSlice, getScript, searchToString, setScript
Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkByScrollRequest
createTask, getDescription, getMaxDocs, getMaxRetries, getRequestsPerSecond, getRetryBackoffInitialTime, getScrollTime, getSearchRequest, getShouldStoreResult, getSize, getSlices, getTimeout, getWaitForActiveShards, isAbortOnVersionConflict, isRefresh, setAbortOnVersionConflict, setConflicts, setMaxDocs, setMaxRetries, setRefresh, setRequestsPerSecond, setRetryBackoffInitialTime, setScroll, setShouldStoreResult, setSize, setSlices, setTimeout, setTimeout, setWaitForActiveShards, setWaitForActiveShards, validate
Methods inherited from class org.elasticsearch.transport.TransportRequest
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.action.IndicesRequest.Replaceable
setPipelineSet the ingest pipeline to set on index requests made by this action.
setQuerySet the query for selective update
setDocTypesDeprecated.Types are in the process of being removed. Instead of using a type, prefer to filter on a field of the document.Set the document types for the update
setRoutingSet routing limiting the process to the shards that match that routing value
setBatchSizepublic UpdateByQueryRequest setBatchSize
(int size)The scroll size to control number of documents processed per batch
setIndicesOptionsSet the IndicesOptions for controlling unavailable indices
getBatchSizepublic int getBatchSize()Gets the batch size for this request
getRoutingpublic String getRouting()Gets the routing value used for this request
getDocTypesDeprecated.Types are in the process of being removed. Instead of using a type, prefer to filter on a field of the document.Gets the document types on which this request would be executed. Returns an empty array if all types are to be processed.
getPipelinepublic String getPipeline()Ingest pipeline to set on index requests made by this action.
selfprotected UpdateByQueryRequest self()Description copied from class:
AbstractBulkByScrollRequest`this` cast to Self. Used for building fluent methods without cast warnings.
forSliceDescription copied from class:
AbstractBulkByScrollRequestBuild a new request for a slice of the parent request.
toStringpublic String toString()
indicesDescription copied from interface:
IndicesRequest.ReplaceableSets the indices that the action relates to.
indicespublic String indices()Description copied from interface:
IndicesRequestReturns the array of indices that the action relates to
indicesOptionspublic IndicesOptions indicesOptions()Description copied from interface:
IndicesRequestReturns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
writeToDescription copied from interface:
toXContentpublic XContentBuilder toXContent
(XContentBuilder builder, ToXContent.Params params) throws IOException