ElasticSearch之Exists API

发布时间 2023-12-02 16:28:28作者: jackieathome

检查指定名称的索引是否存在。

命令样例如下:

curl -I "https://localhost:9200/testindex_002?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"

假如索引不存在,则执行结果的样例,如下:

HTTP/1.1 404 Not Found
X-elastic-product: Elasticsearch
content-type: application/json
content-length: 556

假如索引存在,则执行结果的样例,如下:

HTTP/1.1 200 OK
X-elastic-product: Elasticsearch
content-type: application/json
Transfer-Encoding: chunked

方法参数
如下参数似乎没有作用。

  • flat_settings
  • include_defaults

相关资料