I am new to ElasticSearch. I am trying to delete a group of data from http://localhost:9200/es_index/es_type using python.
suppose x=['a','b','c','d','e','f'] is a list of _ids that I want to delete
Code:
from elasticsearch import Elasticsearch
es = Elasticsearch()
request_body = {
"query": {
"ids": {
"values": ['a','b','c','d','e','f']
}
}
}
es.delete_by_query(index=es_index, body=request_body)
But when I check http://localhost:9200/es_index/es_type the data is still there.
elasticsearch-py?