diff --git a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java index ccfc741b67c..7560e1e8b11 100644 --- a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java +++ b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java @@ -20,7 +20,6 @@ package org.elasticsearch.action.deletebyquery; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.action.ListenableActionFuture; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.unit.TimeValue; @@ -32,8 +31,6 @@ import org.elasticsearch.index.query.QueryBuilder; */ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder { - private QueryBuilder queryBuilder; - public DeleteByQueryRequestBuilder(ElasticsearchClient client, DeleteByQueryAction action) { super(client, action, new DeleteByQueryRequest()); } @@ -59,7 +56,7 @@ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder queryBuilder) { - this.queryBuilder = queryBuilder; + request.query(queryBuilder); return this; } @@ -103,12 +100,4 @@ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder execute() { - if (queryBuilder != null) { - request.query(queryBuilder); - } - return super.execute(); - } - }