python脚本删除es 数据
附代码
from Elasticsearch import Elasticsearch host = '20.0.0.11:9200' es = Elasticsearch([host]) query = {'query': {'match': {'url': 'http://stats.tj.gov.cn/TJTJJ434/JJXX602/202010/t20201026_4001686.html'}}} # 删除url = http://stats.tj.gov.cn/TJTJJ434/JJXX602/202010/t20201026_4001686.html es.delete_by_query(index='guoyan_index_v1', body=query, doc_type='guoyan_index_v1')