I want to delete a particular '_id' in elasticsearch but its not working using elasticsearch python api client.
doc = {'system_caused': 'office', 'division': 'National', 'addt_notes': '', 'pg': '100', 'date': '2016/02/15 08:56',
'duration': '15 minutes', 'outage_caused': 'Scheduled', 'ticket_num': '1234', 'ticket_type': 'JIRA', 'error_count': '1,000 - 5,000'}
self.es = Elasticsearch(['localhost'], verify_certs=True)
result = self.es.index(index='tickets', doc_type='tickets', body=doc)
doc = {'_id': result['_id']}
result = self.es.delete(
index='tickets', doc_type='tickets', **doc)
The inserts are working fine but the delete is failing.
Here is the error I get -
TypeError: delete() got an unexpected keyword argument '_id'
id? github.com/elastic/elasticsearch-py/blob/master/elasticsearch/…