From b0dd31e600e107aade290fdf322979c9a1467673 Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 13 May 2010 09:02:59 +0300 Subject: [PATCH] better delete by query request serialization handling --- .../action/deletebyquery/DeleteByQueryRequest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; }