CKuharski
CKuharski

Reputation: 314

Solr errors when trying to parse a collection: Error parsing JSON field value. Unexp ected OBJECT_START

I'm using the Solr4.3 example schema. I've posted other json docs but these give me problems. It errors if there is more than one value in the collection.

Uri :<code>http://localhost:8983/solr/update?commit=true</code>

Workaround?

//json

[ { "id": "myId", "text": [ { "text": 1 }, { "text": "2" } ] } ]

Upvotes: 0

Views: 1500

Answers (3)

Sushil
Sushil

Reputation: 5535

I hit the same error message. Actually the error message was misplaced. The underlying real error was the two of the required fields as per schema.xml in solr configuration were missing in the json payload.

An error message of the kind "required parameters are missing in the document" would have been more helpful here. You might want to check if some required fields are missing in the json payload.

Upvotes: 0

CKuharski
CKuharski

Reputation: 314

I was able to move on using elasticSearch.

Upvotes: 1

user2515309
user2515309

Reputation: 1

you need to use set to specify the updating value

id:'your id','text':{'set':'new text description'},

and the copyfield destination should be multivalued. regards, Omer Aslam

Upvotes: 0

Related Questions