首页
Java
登录
6mi
u
盘
搜
搜 索
Java
怎么判断ElasticSearch index 和 type 存不存在
怎么判断ElasticSearch index 和 type 存不存在
xiaoxiao
2021-02-27
229
1. 判断index是否存在 curl -X
HEAD
-i 'http://localhost:9200/twitter'如果返回200证明index (twitter)存在,404说明index不存在。 2. 判断type是否存在 curl -X
HEAD
-i 'http://localhost:9200/twitter/tweet' 同样的,如果返回200证明type (tweet)存在,404说明tweet不存在。
转载请注明原文地址: https://www.6miu.com/read-9785.html
技术
最新回复
(
0
)