delete by query rest test fix (maybe)

This commit is contained in:
Colin Goodheart-Smithe 2015-09-23 21:42:09 +01:00
parent 2dce527b81
commit 6d307a3cfd
1 changed files with 1 additions and 12 deletions

View File

@ -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<DeleteByQueryRequest, DeleteByQueryResponse, DeleteByQueryRequestBuilder> {
private QueryBuilder<?> queryBuilder;
public DeleteByQueryRequestBuilder(ElasticsearchClient client, DeleteByQueryAction action) {
super(client, action, new DeleteByQueryRequest());
}
@ -59,7 +56,7 @@ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder<DeleteByQu
* @see org.elasticsearch.index.query.QueryBuilders
*/
public DeleteByQueryRequestBuilder setQuery(QueryBuilder<?> queryBuilder) {
this.queryBuilder = queryBuilder;
request.query(queryBuilder);
return this;
}
@ -103,12 +100,4 @@ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder<DeleteByQu
return this;
}
@Override
public ListenableActionFuture<DeleteByQueryResponse> execute() {
if (queryBuilder != null) {
request.query(queryBuilder);
}
return super.execute();
}
}