赞
踩
terms 查询和 term 查询一样,但它允许你指定多值进行匹配。
如果这个字段包含了指定值中的任何一个值,那么这个文档满足条件,类似于mysql的in
在 Postman中,向ES服务器发GET请求 :http://127.0.0.1:9200/student/_search
{
"query": {
"terms": {
"name": ["zhangsan","lisi"]
}
}
}
服务器响应结果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。