Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
Solr, mail # user - Update JSON format post 3.1?


Copy link to this message
-
Update JSON format post 3.1?
Klostermeyer, Michael 2012-07-05, 18:54
Is there any official documentation on the JSON format Solr 3.5 expects when adding/updating documents via /update/json?  Most of the official documentation is 3.1, and I am of the understanding this changed in v3.2 (https://issues.apache.org/jira/browse/SOLR-2496).  I believe I have the correct format, but I am getting an odd error:

"The request sent by the client was syntactically incorrect (Expected: OBJECT_START but got ARRAY_START"

My JSON format is as follows (simplified):
{"add":
{"doc":
[
{"ID":"987654321","Name":"Steve Smith","ChildIDs":["3841"]}
]
}
}

The idea is that I want to be able to send multiple documents within the same request, although in this example I am demonstrating only a single document. "ChildIDs" is defined as a multivalued field.

Thanks.

Mike Klostermeyer
+
Klostermeyer, Michael 2012-07-05, 20:58