python中的Elasticsearch操作
2019-12-06
阅读 1 分钟
1.7k导入包 from elasticsearch import Elasticsearch 本地连接 es = Elasticsearch(['127.0.0.1:9200']) 创建索引 es.indices.create(index="python_es01",ignore=400) ingore=400 ingore是忽略的意思,400是未找到 删除索引 es.indices.delete(index="python_es01") 检查索引是否存在 es.indices.exists(index="python_es0...