列出 ElasticSearch 服务器上的所有索引? [英] List all indexes on ElasticSearch server?

查看:40
本文介绍了列出 ElasticSearch 服务器上的所有索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想列出 ElasticSearch 服务器上存在的所有索引.我试过这个:

I would like to list all indexes present on an ElasticSearch server. I tried this:

curl -XGET localhost:9200/

但它只是给了我这个:

{
  "ok" : true,
  "status" : 200,
  "name" : "El Aguila",
  "version" : {
    "number" : "0.19.3",
    "snapshot_build" : false
  },
  "tagline" : "You Know, for Search"
}

我想要所有索引的列表..

I want a list of all indexes..

推荐答案

有关集群中所有索引的简明列表,请致电

For a concise list of all indices in your cluster, call

curl http://localhost:9200/_aliases

这将为您提供索引及其别名的列表.

this will give you a list of indices and their aliases.

如果你想要漂亮的打印,添加pretty=true:

If you want it pretty-printed, add pretty=true:

curl http://localhost:9200/_aliases?pretty=true

如果您的索引名为 old_deuteronomymungojerrie,结果将如下所示:

The result will look something like this, if your indices are called old_deuteronomy and mungojerrie:

{
  "old_deuteronomy" : {
    "aliases" : { }
  },
  "mungojerrie" : {
    "aliases" : {
      "rumpleteazer" : { },
      "that_horrible_cat" : { }
    }
  }
}

这篇关于列出 ElasticSearch 服务器上的所有索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆