已更新整合到新文章:https://dataartist.blog.csdn.net/article/details/130139631
比較慢的查詢方法:如果使用如下 body 查詢 ES 索引中內(nèi)容的話,實(shí)際上應(yīng)該會(huì)遍歷索引中所有字段,如果字段內(nèi)容很長(zhǎng)的話,速度會(huì)比較慢:
{
"query": {
"match_all": {}
},
"_source": ""
}
結(jié)果形如:
"hits": [
{
"_index": "...",
"_type": "_doc",
"_id": "...",
"_score": 1.0,
"_source": {}
}
]
比較快的查詢方法:如果使用如下 body 查詢 ES 索引中內(nèi)容的話,則不會(huì)遍歷索引中的所有字段,即使字段內(nèi)容很長(zhǎng),速度也不會(huì)變慢太多:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-633065.html
{
"query": {
"match_all": {}
},
"_source": false
}
結(jié)果形如:文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-633065.html
"hits": [
{
"_index": "...",
"_type": "_doc",
"_id": "...",
"_score": 1.0
}
]
到了這里,關(guān)于ElasticSearch|ES 快速批量查詢 doc 的 _id 的方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!