From 47a0296211f280e7db11ce5b3b92069cc9ef68fe Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 21 Aug 2015 09:49:52 +0200 Subject: [PATCH] Clear ScrollID / NextScrollID even if the first query returned no docs --- .../TransportDeleteByQueryAction.java | 6 ++- .../deletebyquery/DeleteByQueryModule.java | 48 ------------------- .../deletebyquery/DeleteByQueryPlugin.java | 15 ++++-- 3 files changed, 16 insertions(+), 53 deletions(-) delete mode 100644 plugins/delete-by-query/src/main/java/org/elasticsearch/plugin/deletebyquery/DeleteByQueryModule.java diff --git a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryAction.java b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryAction.java index de8d3c84f1a..7f06ce6a6a5 100644 --- a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryAction.java +++ b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryAction.java @@ -174,13 +174,15 @@ public class TransportDeleteByQueryAction extends HandledTransportAction nodeModules() { - return Collections.singletonList(new DeleteByQueryModule()); + public void onModule(ActionModule actionModule) { + actionModule.registerAction(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class); } + + public void onModule(RestModule restModule) { + restModule.addRestAction(RestDeleteByQueryAction.class); + } + }