Package org.elasticsearch.index.reindex
Class AbstractBulkByScrollRequestBuilder<Request extends AbstractBulkByScrollRequest<Request>,Self extends AbstractBulkByScrollRequestBuilder<Request,Self>>
java.lang.Object
org.elasticsearch.action.ActionRequestBuilder<Request,BulkByScrollResponse>
org.elasticsearch.index.reindex.AbstractBulkByScrollRequestBuilder<Request,Self>
- Direct Known Subclasses:
AbstractBulkIndexByScrollRequestBuilder
,DeleteByQueryRequestBuilder
public abstract class AbstractBulkByScrollRequestBuilder<Request extends AbstractBulkByScrollRequest<Request>,Self extends AbstractBulkByScrollRequestBuilder<Request,Self>> extends ActionRequestBuilder<Request,BulkByScrollResponse>
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBulkByScrollRequestBuilder(ElasticsearchClient client, ActionType<BulkByScrollResponse> action, SearchRequestBuilder source, Request request)
-
Method Summary
Modifier and Type Method Description Self
abortOnVersionConflict(boolean abortOnVersionConflict)
Set whether or not version conflicts cause the action to abort.Self
filter(QueryBuilder filter)
Set the query that will filter the source.Self
maxDocs(int maxDocs)
Maximum number of processed documents.Self
refresh(boolean refresh)
Call refresh on the indexes we've written to after the request ends?protected abstract Self
self()
Self
setMaxRetries(int maxRetries)
Total number of retries attempted for rejections.Self
setRequestsPerSecond(float requestsPerSecond)
Set the throttle for this request in sub-requests per second.Self
setRetryBackoffInitialTime(org.elasticsearch.common.unit.TimeValue retryBackoffInitialTime)
Initial delay after a rejection before retrying a bulk request.Self
setShouldStoreResult(boolean shouldStoreResult)
Should this task store its result after it has finished?Self
setSlices(int slices)
The number of slices this task should be divided into.Self
size(int size)
Deprecated.please use maxDocs(int) instead.SearchRequestBuilder
source()
The search used to find documents to process.Self
source(java.lang.String... indices)
Set the source indices.Self
timeout(org.elasticsearch.common.unit.TimeValue timeout)
Timeout to wait for the shards on to be available for each bulk request.Self
waitForActiveShards(ActiveShardCount activeShardCount)
The number of shard copies that must be active before proceeding with the write.Methods inherited from class org.elasticsearch.action.ActionRequestBuilder
execute, execute, get, get, get, request
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AbstractBulkByScrollRequestBuilder
protected AbstractBulkByScrollRequestBuilder(ElasticsearchClient client, ActionType<BulkByScrollResponse> action, SearchRequestBuilder source, Request request)
-
-
Method Details
-
self
-
source
The search used to find documents to process. -
source
Set the source indices. -
filter
Set the query that will filter the source. Just a convenience method for easy chaining. -
size
Deprecated.please use maxDocs(int) instead.Maximum number of processed documents. Defaults to processing all documents. -
maxDocs
Maximum number of processed documents. Defaults to processing all documents. -
abortOnVersionConflict
Set whether or not version conflicts cause the action to abort. -
refresh
Call refresh on the indexes we've written to after the request ends? -
timeout
Timeout to wait for the shards on to be available for each bulk request. -
waitForActiveShards
The number of shard copies that must be active before proceeding with the write. SeeReplicationRequest.waitForActiveShards(ActiveShardCount)
for details. -
setRetryBackoffInitialTime
public Self setRetryBackoffInitialTime(org.elasticsearch.common.unit.TimeValue retryBackoffInitialTime)Initial delay after a rejection before retrying a bulk request. With the default maxRetries the total backoff for retrying rejections is about one minute per bulk request. Once the entire bulk request is successful the retry counter resets. -
setMaxRetries
Total number of retries attempted for rejections. There is no way to ask for unlimited retries. -
setRequestsPerSecond
Set the throttle for this request in sub-requests per second.Float.POSITIVE_INFINITY
means set no throttle and that is the default. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to make sure that it contains any time that we might wait. -
setShouldStoreResult
Should this task store its result after it has finished? -
setSlices
The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
-