我想列出ElasticSearch5上存在的所有索引。我尝试了这个:
curl -s '<server_adress>/_aliases' -u <user:PAsswd> -k
要么
curl XGET "<server_adress>" -u <user:PAsswd> -k
输出:
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>openresty/1.11.2.3</center>
</body>
</html>
谢谢
最佳答案
尝试使用_cat
列出现有索引,
curl -XGET "http://localhost:9200/_cat/indices/"
注意
如果用户没有适当的访问权限,则会发生403-禁止访问。尝试为用户分配适当的角色,以确保其具有适当的权限。
关于elasticsearch - GET列出ElasticSearch5上的所有索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59173841/