curl – elasticsearch中的一个查询中的多个通配符
发布时间:2020-12-14 01:19:29 所属栏目:Linux 来源:网络整理
导读:curl localhost:9200/tweet/posts/_search -d '{ "query": { "and": [ { "wildcard": { "_all": "*pet*" } },{ "wildcard": { "_all": "*rom*" } } ] }}' 这给了我一个解析异常.我想用AND条件运行类似(%test%)类型的MySQL查询.在弹性搜索中还有其他好的方
curl localhost:9200/tweet/posts/_search -d '{ "query": { "and": [ { "wildcard": { "_all": "*pet*" } },{ "wildcard": { "_all": "*rom*" } } ] } }' 这给了我一个解析异常.我想用AND条件运行类似(%test%)类型的MySQL查询.在弹性搜索中还有其他好的方法吗? 解决方法
也许是这样的?
{ "query": { "bool": { "must": [ { "wildcard": { "_all": { "value": "*pet*" } } },{ "wildcard": { "_all": { "value": "*rom*" } } } ] } } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容