ES权威指南[官方文档学习笔记]-9 retrieving a document

es:http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_retrieving_a_document.html

下一篇博客:http://my.oschina.net/qiangzigege/blog/263632

内容:

既然我们在Elasticsearch中有数据了,可以检索。
在es中非常简单,执行一个http的get请求,给定地址参数:index,type,id.

GET /megacorp/employee/1

响应如下:
{
  "_index" :   "megacorp",
  "_type" :    "employee",
  "_id" :      "1",
  "_version" : 1,
  "found" :    true,
  "_source" :  {
      "first_name" :  "John",
      "last_name" :   "Smith",
      "age" :         25,
      "about" :       "I love to go rock climbing",
      "interests":  [ "sports", "music" ]
  }
}

 

 

你可能感兴趣的:(elasticsearch)