版本为:5.5.1
在想使用同时搜索多个字段的时候,提示不支持多个字段,麻烦帮忙看下,谢谢!
如果只搜索一个字段的话,却是正常的。
使用搜索的条件如下:
$queryData['query']['bool']['must']['match'] ['title'] = '长春';
$queryData['query']['bool']['must']['match'] ['businessType']=1;
错误信息如下:
{"error":{"root_cause":[{"type":"parsing_exception","reason":"[match] query doesn't support multiple fields, found [title] and [businessType]","line":1,"col":74}],"type":"parsing_exception","reason":"[match] query doesn't support multiple fields, found [title] and [businessType]","line":1,"col":74},"status":400}
在想使用同时搜索多个字段的时候,提示不支持多个字段,麻烦帮忙看下,谢谢!
如果只搜索一个字段的话,却是正常的。
使用搜索的条件如下:
$queryData['query']['bool']['must']['match'] ['title'] = '长春';
$queryData['query']['bool']['must']['match'] ['businessType']=1;
错误信息如下:
{"error":{"root_cause":[{"type":"parsing_exception","reason":"[match] query doesn't support multiple fields, found [title] and [businessType]","line":1,"col":74}],"type":"parsing_exception","reason":"[match] query doesn't support multiple fields, found [title] and [businessType]","line":1,"col":74},"status":400}
2 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自:
wanghongyan
赞同来自: