def delete()

in src/qldb_streaming_to_es_sample/clients/elasticsearch.py [0:0]


    def delete(self, index, id, version):

        try:

            response = self.es_client.delete(index=index, id=id, version=version, version_type="external")
            print("Deleted document with id: {id}".format(id=id))

            return response

        except (SerializationError, ConflictError,
                RequestError, NotFoundError) as e:  # https://elasticsearch-py.readthedocs.io/en/master/exceptions.html#elasticsearch.ElasticsearchException
            print("Elasticsearch Exception occured while deleting id={id}. Error: {error}"
                  .format(id=id, error=str(e)))
            return None