Indexing a document in smile format and getting it through REST in json format fails, closes #1816.

This commit is contained in:
Shay Banon 2012-03-28 12:03:51 +02:00
parent 269798c70a
commit f9eeb37211
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ public class RestXContentBuilder {
if (contentType == builder.contentType()) {
builder.rawField("_source", source, offset, length);
} else {
XContentParser parser = XContentFactory.xContent(contentType).createParser(source);
XContentParser parser = XContentFactory.xContent(contentType).createParser(source, offset, length);
try {
parser.nextToken();
builder.field("_source");