I'm running an AWS Elasticsearch Service cluster with ES 5.5, and am trying to perform a delete document operation using the Python API.
When searching for the document using a document ID string, the API returns True.
doc_exists = esClient.exists(index='debug', doc_type='_all', id=doc_id)
However, when I try to delete it using the same document ID, I receive a NotFoundError.
esClient.delete(index='debug', doc_type='_all', id=doc_id)
exception received:
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)elasticsearch.exceptions.NotFoundError: TransportError(404, '
{
"found": false,
"_index": "debug",
"_type": "_all",
"_id": "some-id-with-dash_and_underscore",
"_version": 1,
"result": "not_found",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
}
}
'): NotFoundError
Can't figure out what's wrong here.