本文主要是介绍elasticSearch 检索 mget 用法示例,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
总结一下自己看elsaticsearch
文档,对于mget
用法的实践:
需要说明一下,这里必须是ids
或者docs
,否则会报如下的异常信息:
异常信息如下:
{"error": {"root_cause": [{"type": "parsing_exception","reason": "unknown key [policyxxx] for a START_ARRAY, expected [docs] or [ids]","line": 2,"col": 14}],"type": "parsing_exception","reason": "unknown key [policyxxx] for a START_ARRAY, expected [docs] or [ids]","line": 2,"col": 14},"status": 400
}
GET index_name/type_name/_mget
{"ids":["10000000xxx","1000000074xxx"]
}
返回的结构如下:
这篇关于elasticSearch 检索 mget 用法示例的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!