使用Elasticsearch节点客户端搜索案例不敏感的通配符搜索
我正在使用Node Client使用Elasticsearch版本7.17.0,并且正在尝试执行通配符搜索这样的搜索:
const query: QueryDslQueryContainer = {
wildcard: {
'fieldName.wildcard': '*ing',
case_insensitive: 'true',
},
}
我收到错误
ResponseError: parsing_exception: [parsing_exception] Reason: [wildcard] query doesn't support multiple fields, found [fieldName.wildcard] and [case_insensitive]
文档表示在版本7.10.0中添加了案例不敏感的通配符搜索。不确定如何获取不敏感的通配符查询。
I'm using Elasticsearch version 7.17.0 with node client and am trying to execute a wildcard search like so:
const query: QueryDslQueryContainer = {
wildcard: {
'fieldName.wildcard': '*ing',
case_insensitive: 'true',
},
}
I receive the error
ResponseError: parsing_exception: [parsing_exception] Reason: [wildcard] query doesn't support multiple fields, found [fieldName.wildcard] and [case_insensitive]
The documentation indicates that case-insensitive wildcard search was added in version 7.10.0. Not sure how to get case-insensitive wildcard queries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您的查询是错误的。
这样尝试:
I believe that you query is wrong.
Try like this: