Package org.elasticsearch.index.reindex
Class ReindexRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.index.reindex.AbstractBulkByScrollRequest<Self>
-
- org.elasticsearch.index.reindex.AbstractBulkIndexByScrollRequest<ReindexRequest>
-
- org.elasticsearch.index.reindex.ReindexRequest
-
- All Implemented Interfaces:
CompositeIndicesRequest,Streamable,Writeable,TaskAwareRequest
public class ReindexRequest extends AbstractBulkIndexByScrollRequest<ReindexRequest> implements CompositeIndicesRequest
Request to reindex some documents from one index to another. 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 for a bunch of reasons, not least of which that scripts are allowed to change the destination request in drastic ways, including changing the index to which documents are written.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.reindex.AbstractBulkByScrollRequest
AUTO_SLICES, AUTO_SLICES_VALUE, SIZE_ALL_MATCHES
-
-
Constructor Summary
Constructors Constructor Description ReindexRequest()ReindexRequest(SearchRequest search, IndexRequest destination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReindexRequestforSlice(TaskId slicingTask, SearchRequest slice, int totalSlices)Build a new request for a slice of the parent request.IndexRequestgetDestination()RemoteInfogetRemoteInfo()voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.protected ReindexRequestself()`this` cast to Self.voidsetRemoteInfo(RemoteInfo remoteInfo)java.lang.StringtoString()ActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkByScrollRequest
createTask, getDescription, getMaxRetries, getRequestsPerSecond, getRetryBackoffInitialTime, getScrollTime, getSearchRequest, getShouldStoreResult, getSize, getSlices, getTimeout, getWaitForActiveShards, isAbortOnVersionConflict, isRefresh, setAbortOnVersionConflict, setConflicts, setMaxRetries, setRefresh, setRequestsPerSecond, setRetryBackoffInitialTime, setScroll, setShouldStoreResult, setSize, setSlices, setTimeout, setWaitForActiveShards, setWaitForActiveShards
-
Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkIndexByScrollRequest
doForSlice, getScript, searchToString, setScript
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
-
-
-
Constructor Detail
-
ReindexRequest
public ReindexRequest()
-
ReindexRequest
public ReindexRequest(SearchRequest search, IndexRequest destination)
-
-
Method Detail
-
self
protected ReindexRequest self()
Description copied from class:AbstractBulkByScrollRequest`this` cast to Self. Used for building fluent methods without cast warnings.- Specified by:
selfin classAbstractBulkByScrollRequest<ReindexRequest>
-
validate
public ActionRequestValidationException validate()
- Overrides:
validatein classAbstractBulkByScrollRequest<ReindexRequest>
-
getDestination
public IndexRequest getDestination()
-
setRemoteInfo
public void setRemoteInfo(RemoteInfo remoteInfo)
-
getRemoteInfo
public RemoteInfo getRemoteInfo()
-
forSlice
public ReindexRequest forSlice(TaskId slicingTask, SearchRequest slice, int totalSlices)
Description copied from class:AbstractBulkByScrollRequestBuild a new request for a slice of the parent request.- Specified by:
forSlicein classAbstractBulkByScrollRequest<ReindexRequest>
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classAbstractBulkIndexByScrollRequest<ReindexRequest>- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAbstractBulkIndexByScrollRequest<ReindexRequest>- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-