Could you please help. I have to update a Solr document by its unique identifier. Say, I have a document like:
{
"text": "qwe",
"id": "01a3aa6db06d39e8",
"_version_": 1471599607983112200
}
I want to update the field "phrase", so I POST the following to 127.0.0.1:8983/solr/update/?commit=true:
[
{
"id" : "01a3aa6db06d39e8",
"text" : {"set":"qwe. updated"}
}
]
Solr says 400 Bad Request and returns the following:
{
"responseHeader":
{
"status":400,"QTime":0},
"error":{"msg":"Document contains multiple values for uniqueKey field: id=[01a3aa6db06d39e8, 0000000000000000]","code":400}
}
}
How the document containing a unique key can be properly updated?
<field name="id" … />from your schema.xml? - lxgname="id". Can you post that one please? - lxgname="id"? If not, could you please post your schema.xml and solrconfig.xml to some pastebin? - lxg