Package org.elasticsearch.index.reindex
Class AbstractBulkIndexByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>>
- 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<Self>
-
- All Implemented Interfaces:
Streamable
,Writeable
,TaskAwareRequest
- Direct Known Subclasses:
ReindexRequest
,UpdateByQueryRequest
public abstract class AbstractBulkIndexByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>> extends AbstractBulkByScrollRequest<Self>
-
-
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, DEFAULT_SCROLL_SIZE, DEFAULT_SCROLL_TIMEOUT, SIZE_ALL_MATCHES
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractBulkIndexByScrollRequest()
Constructor for deserialization.protected
AbstractBulkIndexByScrollRequest(SearchRequest searchRequest, boolean setDefaults)
Constructor for actual use.
-
Method Summary
Modifier and Type Method Description protected Self
doForSlice(Self request, TaskId slicingTask, int totalSlices)
Setup a clone of this request with the information needed to process a slice of it.Script
getScript()
Script to modify the documents before they are processed.void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.protected void
searchToString(java.lang.StringBuilder b)
Append a short description of the search request to a StringBuilder.Self
setScript(Script script)
Script to modify the documents before they are processed.void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.index.reindex.AbstractBulkByScrollRequest
createTask, forSlice, getDescription, getMaxRetries, getRequestsPerSecond, getRetryBackoffInitialTime, getScrollTime, getSearchRequest, getShouldStoreResult, getSize, getSlices, getTimeout, getWaitForActiveShards, isAbortOnVersionConflict, isRefresh, self, setAbortOnVersionConflict, setConflicts, setMaxRetries, setRefresh, setRequestsPerSecond, setRetryBackoffInitialTime, setScroll, setShouldStoreResult, setSize, setSlices, setTimeout, setTimeout, setWaitForActiveShards, setWaitForActiveShards, validate
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
-
-
-
-
Constructor Detail
-
AbstractBulkIndexByScrollRequest
public AbstractBulkIndexByScrollRequest()
Constructor for deserialization.
-
AbstractBulkIndexByScrollRequest
protected AbstractBulkIndexByScrollRequest(SearchRequest searchRequest, boolean setDefaults)
Constructor for actual use.- Parameters:
searchRequest
- the search request to execute to get the documents to processsetDefaults
- should this request set the defaults on the search request? Usually set to true but leave it false to support request slicing
-
-
Method Detail
-
getScript
public Script getScript()
Script to modify the documents before they are processed.
-
setScript
public Self setScript(@Nullable Script script)
Script to modify the documents before they are processed.
-
doForSlice
protected Self doForSlice(Self request, TaskId slicingTask, int totalSlices)
Description copied from class:AbstractBulkByScrollRequest
Setup a clone of this request with the information needed to process a slice of it.- Overrides:
doForSlice
in classAbstractBulkByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>>
-
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 classAbstractBulkByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>>
- 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 classAbstractBulkByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>>
- Throws:
java.io.IOException
-
searchToString
protected void searchToString(java.lang.StringBuilder b)
Description copied from class:AbstractBulkByScrollRequest
Append a short description of the search request to a StringBuilder. Used to make toString.- Overrides:
searchToString
in classAbstractBulkByScrollRequest<Self extends AbstractBulkIndexByScrollRequest<Self>>
-
-