弹性搜索中通配符和模糊查询一起 [英] Wildcard and Fuzzy query together in elastic search
本文介绍了弹性搜索中通配符和模糊查询一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试设计一个查询,在其中可以同时使用通配符和模糊查询。
I am trying to design a query in which, I can use wildcard and Fuzzy query together.
根据我的说法,query_string用于通配符搜索,multi_match可以
According to me, query_string is used for wildcard searches and multi_match can be used for fuzziness.
我想要一个查询单词的查询:-
I want a query which will search on words :-
elast: -提供结果elastic和elasticsearch。
elasttc:-还提供弹性和弹性搜索结果。
"elast" : - provide results elastic and elasticsearch. "elasttc" :- also provide results as elastic and elasticsearch.
弹性搜索同时支持通配符和模糊查询?
Elastic search supports wildcard and fuzzy query together??
谢谢...
推荐答案
{
"query": {
"bool": {
"should": [
{
"match": {
"title": "testing"
}
},
{
"wildcard": {
"title": "*testing*"
}
},
{
"fuzzy": {
"title": "testing"
}
}
],
"minimum_should_match": 1
}
}
}
这篇关于弹性搜索中通配符和模糊查询一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文