From 8a5f76728680c907233fe4464190897dc8505458 Mon Sep 17 00:00:00 2001 From: Aaron Sutter Date: Wed, 23 Nov 2011 16:38:35 -0800 Subject: [PATCH] changed writeObject to writeArray dealing with json array not json map --- .../java/org/elasticsearch/river/couchdb/CouchdbRiver.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/river/couchdb/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java b/plugins/river/couchdb/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java index 6e9461491e0..8b09dd9a1e6 100644 --- a/plugins/river/couchdb/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java +++ b/plugins/river/couchdb/src/main/java/org/elasticsearch/river/couchdb/CouchdbRiver.java @@ -353,11 +353,13 @@ public class CouchdbRiver extends AbstractRiverComponent implements River { // bigcouch uses array for the seq try { XContentBuilder builder = XContentFactory.jsonBuilder(); - builder.startObject(); + //builder.startObject(); + builder.startArray(); for (Object value : ((List) lastSeq)) { builder.value(value); } - builder.endObject(); + builder.endArray(); + //builder.endObject(); lastSeqAsString = builder.string(); } catch (Exception e) { logger.error("failed to convert last_seq to a json string", e);