From 475564449f924cfa8df839f5e23c21a9e4fbcf28 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 27 Jun 2011 21:51:14 +0300 Subject: [PATCH] properly take offset and length into account (introduced with realtime get) --- .../elasticsearch/rest/action/support/RestXContentBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestXContentBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestXContentBuilder.java index e945a50b72d..007d6c57a45 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestXContentBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestXContentBuilder.java @@ -91,7 +91,7 @@ public class RestXContentBuilder { } else { XContentType contentType = XContentFactory.xContentType(source, offset, length); if (contentType == builder.contentType()) { - builder.rawField("_source", source); + builder.rawField("_source", source, offset, length); } else { XContentParser parser = XContentFactory.xContent(contentType).createParser(source); try {