mget English meaning: Multi Get API
It allows us to get a large number of document
mget query is based on the index, type (optional), id three conditions ( must have index and the above mentioned id )
mget can not be used to query
1, do not use the specified index
GET /_mget { "docs" : [ { "_index" : "test", "_type" : "_doc", "_id" : "1" }, { "_index" : "test", "_type" : "_doc", "_id" : "2" } ] }
2, use the specified index
GET /test/_mget { "docs" : [ { "_type" : "_doc", "_id" : "1" }, { "_type" : "_doc", "_id" : "2" } ] }