How to update data in solr

Attempting to update a solr document with the data below

[{"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 the best way to update your solr 4.0 document data with a single URL.

+5
source share
1 answer

Quote from the lucene talk page: Link Link

The admin page allows only a single JSON document be added, because it wraps it in tags, for example ...

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

You can use curl utility or post.jar to add multiple document at the same time.

Link to update solr document using curl. Updating Solr Index Using JSON

+2
source

Source: https://habr.com/ru/post/1232243/


All Articles