Steve Suh created SOLR-7704:
-------------------------------

             Summary: delete by query throws document id missing mandatory 
uniqueKey field: Id when called by JSON but works fine via XML
                 Key: SOLR-7704
                 URL: https://issues.apache.org/jira/browse/SOLR-7704
             Project: Solr
          Issue Type: Bug
          Components: Build
    Affects Versions: 5.0
         Environment: Mac Yosemite, Java 1.8, 15" Macbook Pro(2015 model)
            Reporter: Steve Suh
            Priority: Blocker


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":{"status":400,"QTime":2},"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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to