Elasticsearch学习笔记之—mget
生活随笔
收集整理的這篇文章主要介紹了
Elasticsearch学习笔记之—mget
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
mget的英文意思是:Multi GetAPI
允許我們一次get大量的document
mget 查詢是基于index,type(可選),id三個條件進(jìn)行(必須要有index和id)
mget不能用來查詢
1、不指定索引的使用方式
GET /_mget
{
"docs" : [
{
"_index" : "test",
"_type" : "_doc",
"_id" : "1"
},
{
"_index" : "test",
"_type" : "_doc",
"_id" : "2"
}
]
}
2、指定索引的使用方式
GET /test/_mget
{
"docs" : [
{
"_type" : "_doc",
"_id" : "1"
},
{
"_type" : "_doc",
"_id" : "2"
}
]
}
總結(jié)
以上是生活随笔為你收集整理的Elasticsearch学习笔记之—mget的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: STL 中的链表排序
- 下一篇: Windows硬盘映射网络磁盘目录,设置