Package org.elasticsearch.index.reindex
Class AsyncDeleteByQueryAction
- java.lang.Object
-
- org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-
- org.elasticsearch.index.reindex.AsyncDeleteByQueryAction
-
public class AsyncDeleteByQueryAction extends AbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
Implementation of delete-by-query using scrolling and bulk.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction
AbstractAsyncBulkByScrollAction.DeleteRequestWrapper, AbstractAsyncBulkByScrollAction.IndexRequestWrapper, AbstractAsyncBulkByScrollAction.OpType, AbstractAsyncBulkByScrollAction.RequestWrapper<Self extends DocWriteRequest<Self>>, AbstractAsyncBulkByScrollAction.ScriptApplier
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction
logger, mainAction, mainRequest, task, threadPool, worker
-
-
Constructor Summary
Constructors Constructor Description AsyncDeleteByQueryAction(BulkByScrollTask task, org.apache.logging.log4j.Logger logger, ParentTaskAssigningClient client, ThreadPool threadPool, TransportDeleteByQueryAction action, DeleteByQueryRequest request, ScriptService scriptService, ActionListener<BulkByScrollResponse> listener)
-
Method Summary
Modifier and Type Method Description protected boolean
accept(ScrollableHitSource.Hit doc)
Used to accept or ignore a search hit.protected AbstractAsyncBulkByScrollAction.RequestWrapper<DeleteRequest>
buildRequest(ScrollableHitSource.Hit doc)
Build theAbstractAsyncBulkByScrollAction.RequestWrapper
for a single search hit.protected AbstractAsyncBulkByScrollAction.RequestWrapper<?>
copyMetadata(AbstractAsyncBulkByScrollAction.RequestWrapper<?> request, ScrollableHitSource.Hit doc)
Overrides the parent's implementation is much more Update/Reindex oriented and so also copies things like timestamp/ttl which we don't care for a deletion.-
Methods inherited from class org.elasticsearch.index.reindex.AbstractAsyncBulkByScrollAction
buildResponse, buildScriptApplier, buildScrollableResultSource, copyRouting, finishHim, finishHim, start, wrap, wrap
-
-
-
-
Constructor Detail
-
AsyncDeleteByQueryAction
public AsyncDeleteByQueryAction(BulkByScrollTask task, org.apache.logging.log4j.Logger logger, ParentTaskAssigningClient client, ThreadPool threadPool, TransportDeleteByQueryAction action, DeleteByQueryRequest request, ScriptService scriptService, ActionListener<BulkByScrollResponse> listener)
-
-
Method Detail
-
accept
protected boolean accept(ScrollableHitSource.Hit doc)
Description copied from class:AbstractAsyncBulkByScrollAction
Used to accept or ignore a search hit. Ignored search hits will be excluded from the bulk request. It is also where we fail on invalid search hits, like when the document has no source but it's required.- Overrides:
accept
in classAbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-
buildRequest
protected AbstractAsyncBulkByScrollAction.RequestWrapper<DeleteRequest> buildRequest(ScrollableHitSource.Hit doc)
Description copied from class:AbstractAsyncBulkByScrollAction
Build theAbstractAsyncBulkByScrollAction.RequestWrapper
for a single search hit. This shouldn't handle metadata or scripting. That will be handled by copyMetadata and apply functions that can be overridden.- Specified by:
buildRequest
in classAbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-
copyMetadata
protected AbstractAsyncBulkByScrollAction.RequestWrapper<?> copyMetadata(AbstractAsyncBulkByScrollAction.RequestWrapper<?> request, ScrollableHitSource.Hit doc)
Overrides the parent's implementation is much more Update/Reindex oriented and so also copies things like timestamp/ttl which we don't care for a deletion.- Overrides:
copyMetadata
in classAbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-
-