Elasticsearch过滤搜索
ES 6.x中,如果我们查询的时候不需要返回所有字段,可以添加_source:[filedid,...]选择我们需要返回的数据。举个例子,ES中的数据如果是直接查询返回有好几十个字段,过滤出其中几个字段POST ip/xxxx/_search{"_source": ["email","name","age"],"query":{ "bool":{ must:[ { "match":{ "email":"xxx@xxx.xxx" } } ] }}}#
原创
2020-06-29 16:51:43 ·
353 阅读 ·
0 评论