lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dwane Hall <dwaneh...@hotmail.com>
Subject Delete by id
Date Mon, 11 Feb 2019 23:24:40 GMT
Hey Solr community,

I’m having an issue deleting documents from my Solr index and am seeking some community
advice when somebody gets a spare minute. It seems really like a really simple problem …a
requirement to delete a document by its id.

Here’s how my documents are mapped in solr

<uniqueKey>DOC_ID</uniqueKey>
<field name="DOC_ID" type="string" indexed="true" stored="true" required="true" multiValued="false"
/>

My json format to delete the document (all looks correct according to https://lucene.apache.org/solr/guide/7_6/uploading-data-with-index-handlers.html
“The JSON update format allows for a simple delete-by-id. The value of a delete can be an
array which contains a list of zero or more specific document id’s (not a range) to be deleted.
For example, a single document”)

Attempt 1 – “shorthand”
{“delete”:”123!12345”}

Attempt 2 – “longhand”
{“delete”:“DOC_ID”:”123!12345”}
{“delete”:{“DOC_ID”:”123!12345”}}

..the error is the same in all instances “org.apache.solr.common.SolrException: Document
is missing mandatory uniqueKey field: DOC_ID”

Can anyone see any obvious details I’m overlooking?

I’ve tried all the update handlers below (both curl and through admin ui)

/update/
/update/json
/update/json/docs

My environment
Solr cloud 7.6
Single node

As always any advice would be greatly appreciated,

Thanks,

Dwane

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message