Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Invalid
-
5.0
-
None
-
None
-
Mac Yosemite, Java 1.8, 15" Macbook Pro(2015 model)
Description
Here are the curl commands on my local box.
curl -v http://localhost:8983/solr/nZ/update -H "Content-Type: application/json" --data-binary '
[
{"delete" : { "query":"UserId:5629499534213120 AND SessionId:5066549580791808 AND Kind:event"}}
]'
This outputs:
{"responseHeader":
,"error":{"msg":"Document is missing mandatory uniqueKey field: Id","code":400}}
Running it via XML works:
curl -v http://localhost:8983/solr/nZ/update -H "Content-Type: text/xml" --data-binary '
<delete>
<query>UserId:5629499534213120 AND SessionId:5066549580791808 AND Kind:event</query>
</delete>
'
This outputs:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">57</int></lst>
</response>
I also queried the documents I'm trying to delete. There were only 2 of them and they both had the Id fields. Id is the a string and the unique key. I'm thinking it's a bug since the XML call works unless my JSON format is wrong somehow. Please investigate.
Thanks,
Steve Suh