5

Trying to updating the solr document with below passed data

[{"id":"6","status":{"set":"3"}},
{"id":"10","status":{"set":"3"}}]

Throwing this error message :

"msg": "Expected: OBJECT_START but got ARRAY_START at [16]",

Please suggest a best way to update solr 4.0 document data with single url.

YoungHobbit
  • 13,254
  • 9
  • 50
  • 73
GautamD31
  • 28,552
  • 10
  • 64
  • 85

1 Answers1

2

Quoting from lucene discussion page: Reference Link

The admin page accepts only a single JSON document to be added, because it wraps it in tags like so...

{"add":{ "doc": YOUR_TEXT_AREA_INPUT, ....

You can use the curl utility or post.jar for adding multiple document at the same time.

Reference for the updating solr document using curl . Updating a Solr Index with JSON

stefan.m
  • 1,912
  • 4
  • 20
  • 36
YoungHobbit
  • 13,254
  • 9
  • 50
  • 73
  • Seems to be correct, but why does the form says "Document(s)" instead of "Document", then? This is misleading, at least, beacuse nobody expects that multiple documents won't work when plural is mentioned in the forms label. – Campfire May 17 '17 at 12:40