diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java index 59e5dc3353d..879391380c7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java @@ -167,7 +167,17 @@ public class DeleteByQueryRequest extends IndicesReplicationOperationRequest { * The query source to execute. */ @Required public DeleteByQueryRequest query(byte[] querySource) { + return query(querySource, 0, querySource.length); + } + + /** + * The query source to execute. + */ + @Required public DeleteByQueryRequest query(byte[] querySource, int offset, int length) { this.querySource = querySource; + this.querySourceOffset = offset; + this.querySourceLength = length; + this.querySourceUnsafe = false; return this; }