Package org.opensearch.index.reindex
Class AsyncDeleteByQueryAction
java.lang.Object
org.opensearch.index.reindex.AbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
org.opensearch.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.opensearch.index.reindex.AbstractAsyncBulkByScrollAction
AbstractAsyncBulkByScrollAction.DeleteRequestWrapper, AbstractAsyncBulkByScrollAction.IndexRequestWrapper, AbstractAsyncBulkByScrollAction.OpType, AbstractAsyncBulkByScrollAction.RequestWrapper<Self extends DocWriteRequest<Self>>, AbstractAsyncBulkByScrollAction.ScriptApplier -
Field Summary
Fields inherited from class org.opensearch.index.reindex.AbstractAsyncBulkByScrollAction
interceptor, logger, mainRequest, scriptService, sslConfig, task, threadPool, worker -
Constructor Summary
ConstructorsConstructorDescriptionAsyncDeleteByQueryAction(BulkByScrollTask task, org.apache.logging.log4j.Logger logger, ParentTaskAssigningClient client, ThreadPool threadPool, DeleteByQueryRequest request, ScriptService scriptService, org.opensearch.core.action.ActionListener<BulkByScrollResponse> listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanUsed to accept or ignore a search hit.Build theAbstractAsyncBulkByScrollAction.RequestWrapperfor 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.opensearch.index.reindex.AbstractAsyncBulkByScrollAction
buildResponse, buildScriptApplier, buildScrollableResultSource, copyRouting, finishHim, finishHim, start, wrap, wrap
-
Constructor Details
-
AsyncDeleteByQueryAction
public AsyncDeleteByQueryAction(BulkByScrollTask task, org.apache.logging.log4j.Logger logger, ParentTaskAssigningClient client, ThreadPool threadPool, DeleteByQueryRequest request, ScriptService scriptService, org.opensearch.core.action.ActionListener<BulkByScrollResponse> listener)
-
-
Method Details
-
accept
Description copied from class:AbstractAsyncBulkByScrollActionUsed 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:
acceptin classAbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-
buildRequest
protected AbstractAsyncBulkByScrollAction.RequestWrapper<DeleteRequest> buildRequest(ScrollableHitSource.Hit doc) Description copied from class:AbstractAsyncBulkByScrollActionBuild theAbstractAsyncBulkByScrollAction.RequestWrapperfor 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:
buildRequestin 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:
copyMetadatain classAbstractAsyncBulkByScrollAction<DeleteByQueryRequest,TransportDeleteByQueryAction>
-