api:
(elasticsearch版本7.3)#通过id查询 GET <index>/_doc/<_id> #判断是否存在 HEAD <index>/_doc/<_id> #通过id查询 GET <index>/_source/<_id> #判断是否存在 HEAD <index>/_source/<_id> #查询指定index的多个文档 GET /<index>/_mget #查询多个文档 GET /_mget
1. GET <index>/_doc/<_id>
#测试--查询 GET /king_test_person/_doc/33
2. HEAD <index>/_doc/<_id>
HEAD /king_test_person/_doc/33
3. GET <index>/_source/<_id>
#测试--查询 GET /king_test_person/_source/33
4. HEAD <index>/_source/<_id>
HEAD /king_test_person/_source/33
5. GET <index>/_mget
#测试--mget GET /king_test_person/_mget { "ids":[33,666] }
#测试--mget GET /king_test_person/_mget { "docs" : [ { "_type" : "_doc", "_id" : "33" }, { "_type" : "_doc", "_id" : "666" } ] }
#测试--mget GET /king_test_person/_doc/_mget { "docs" : [ { "_id" : "33" }, { "_id" : "666" } ] }
6. GET /mget
#测试--mget GET /_mget { "docs" : [ { "_index":"king_test_person", "_type" : "_doc", "_id" : "33" }, { "_index":"king_test_person", "_type" : "_doc", "_id" : "666" } ] }标签:king,GET,doc,get,查询,person,elasticsearch,test,mget From: https://www.cnblogs.com/wq-blogs/p/17908783.html