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 ReindexRequest
forSlice(TaskId slicingTask, SearchRequest slice, int totalSlices)
Build a new request for a slice of the parent request.IndexRequest
getDestination()
RemoteInfo
getRemoteInfo()
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.protected ReindexRequest
self()
`this` cast to Self.void
setRemoteInfo(RemoteInfo remoteInfo)
java.lang.String
toString()
ActionRequestValidationException
validate()
void
writeTo(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:
self
in classAbstractBulkByScrollRequest<ReindexRequest>
-
validate
public ActionRequestValidationException validate()
- Overrides:
validate
in 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:AbstractBulkByScrollRequest
Build a new request for a slice of the parent request.- Specified by:
forSlice
in classAbstractBulkByScrollRequest<ReindexRequest>
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classAbstractBulkIndexByScrollRequest<ReindexRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classAbstractBulkIndexByScrollRequest<ReindexRequest>
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-