ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
# Get Index /获取索引 原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html) 译文链接 : [Get Index /获取索引](/pages/viewpage.action?pageId=4882793) 贡献者 : [Le-Mon](/display/~tanwen) 注意:涉及翻译内容: Index-索引;types-类型;mapping-映射;aliases-别名;shards-分片;replicas-副本 Get Index API允许获得一个或多个索引的信息 ``` curl -XGET 'localhost:9200/twitter?pretty' ``` 上面的例子获得 twitter 索引的信息。API必须指定一个索引,别名或通配符表达式。       API也可以应用于多个索引,通过使用 _all 或者 *作为索引名。 ## Filtering index information /筛选需要信息 返回的信息可以筛选,通过在URL后指定一个逗号分隔的列表: ``` curl -XGET 'localhost:9200/twitter/_settings,_mappings?pretty' ``` 上述命令返回 twitter 的 设置 和 映射。 可用设置为 `_settings`, `_mappings` 和 `_aliases`.