Answers:
探索您的ElasticSearch集群的最简单方法可能是使用elasticsearch -head。
您可以通过以下方式安装它:
cd elasticsearch/
./bin/plugin -install mobz/elasticsearch-head
然后(假设ElasticSearch已在本地计算机上运行),打开一个浏览器窗口以:
http://localhost:9200/_plugin/head/
另外,您也可以curl从命令行使用,例如:    
检查映射以获取索引:
curl -XGET 'http://127.0.0.1:9200/my_index/_mapping?pretty=1' 
获取一些样本文档:
curl -XGET 'http://127.0.0.1:9200/my_index/_search?pretty=1' 
查看存储在特定字段中的实际术语(即如何分析该字段):
curl -XGET 'http://127.0.0.1:9200/my_index/_search?pretty=1'  -d '
 {
    "facets" : {
       "my_terms" : {
          "terms" : {
             "size" : 50,
             "field" : "foo"
          }
       }
    }
 }
此处提供更多信息:http : //www.elasticsearch.org/guide
到目前为止,curl为Elasticsearch 编写样式命令的最简单方法是Marvel中的Sense插件。
它带有源代码突出显示,漂亮的缩进和自动完成功能。
绝对简单的查看索引数据的方法是在浏览器中查看数据。无需下载或安装。
我将假设您的elasticsearch主机为http://127.0.0.1:9200。
第1步
导航到http://127.0.0.1:9200/_cat/indices?v列出您的索引。您会看到以下内容:
第2步
尝试访问所需的索引:
http://127.0.0.1:9200/products_development_20160517164519304
输出将如下所示:
注意aliases,这意味着我们也可以在以下位置访问索引:
http://127.0.0.1:9200/products_development
第三步
导航以http://127.0.0.1:9200/products_development/_search?pretty查看您的数据:
http://127.0.0.1:9200/products_development/_search?pretty=1只显示样本数据吗?它似乎并未显示所有数据
                    通过对数据进行分组来解决问题-DrTech的答案在管理该问题时使用了多个方面,但根据Elasticsearch 1.0参考文献将不建议使用。
Warning
Facets are deprecated and will be removed in a future release. You are encouraged to
migrate to aggregations instead.
构面已由聚合代替- 《弹性搜索指南》以可访问的方式引入了聚合– 从而使示例变得有意义。。
解决方案是相同的,除了需要聚合aggs而不是facets且计数为0(将限制设置为最大整数)   - 示例代码需要Marvel插件
# Basic aggregation
GET /houses/occupier/_search?search_type=count
{
    "aggs" : {
        "indexed_occupier_names" : {    <= Whatever you want this to be
            "terms" : {
              "field" : "first_name",    <= Name of the field you want to aggregate
              "size" : 0
            }
        }
    }
}
这是用于测试的Sense代码-房屋索引示例,带有占用者类型和字段first_name:
DELETE /houses
# Index example docs
POST /houses/occupier/_bulk
{ "index": {}}
{ "first_name": "john" }
{ "index": {}}
{ "first_name": "john" }
{ "index": {}}
{ "first_name": "mark" }
# Basic aggregation
GET /houses/occupier/_search?search_type=count
{
    "aggs" : {
        "indexed_occupier_names" : {
            "terms" : {
              "field" : "first_name",
              "size" : 0
            }
        }
    }
}
显示相关聚合代码的响应。在索引中有两个键,John和Mark。
    ....
    "aggregations": {
      "indexed_occupier_names": {
         "buckets": [
            {
               "key": "john",     
               "doc_count": 2     <= 2 documents matching
            },                        
            {
               "key": "mark",
               "doc_count": 1     <= 1 document matching
            }
         ]
      }
   }
   ....
              如果您使用的是Google Chrome浏览器,则可以简单地使用名为Sense的扩展程序,如果您使用的是Marvel,它也是一种工具。
https://chrome.google.com/webstore/detail/sense-beta/lhjgkmllcaadmopgmanpapmpjgmfcfig
按照@JanKlimo示例,在终端上,您要做的就是:
查看所有索引:
$ curl -XGET 'http://127.0.0.1:9200/_cat/indices?v'
查看Index的内容products_development_20160517164519304:
$ curl -XGET 'http://127.0.0.1:9200/products_development_20160517164519304/_search?pretty=1'
Kibana也是一个很好的解决方案。这是Elastic的数据可视化平台,如果已安装,则默认在端口5601上运行。
它提供了许多东西。它具有“开发工具”,我们可以在其中进行调试。
例如,您可以使用以下命令在此处检查可用索引
GET /_cat/indices
              
curl localhost:9200/my_index/_search?q=*&pretty-假设索引中的文档集有限。