Elasticsearch检索文档GET

Elasticsearch大约 411 字

检索文档

使用GET指令

curl -X GET "localhost:9200/megacorp/employee/1?pretty=true"

输出:

{
  "_index" : "megacorp",
  "_type" : "employee",
  "_id" : "1",
  "_version" : 1,
  "_seq_no" : 0,
  "_primary_term" : 1,
  "found" : true,
  "_source" : {
    "first_name" : "John",
    "last_name" : "Smith",
    "age" : 25,
    "about" : "I love to go rock climbing",
    "interests" : [
      "sports",
      "music"
    ]
  }
}
阅读 260 · 发布于 2019-04-25

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批