批量查询"_mget"

1、不同index的批量查询
GET /_mget
{
  "docs":[{
    "_index":"test_index1",
    "_type":"test_type1",
    "_id":1
    },{
    "_index":"test_index2",
    "_type":"test_type1",
    "_id":1
  }]
}

2、相同index,不同type的批量查询
GET /test_index/_mget
{
  "docs":[{
    "_type":"test_type1",
    "_id":1
    },{
    "_type":"test_type2",
    "_id":2
  }]
}

3、相同index、type,不同id的批量查询
GET /test_index/test_type/_mget
{
  "ids":[1,2]
}

原文地址:https://www.cnblogs.com/qinjf/p/8506349.html