如何将具有Multi_Match的筛选查询转换为通用条款的过滤查询 [英] How to convert filtered query with Multi_Match to filtered query with Common Terms
问题描述
multi_match
: {
filtered:{
query:{
multi_match:{
query:sleep,
fields:[title。 10,介绍*],
cutoff_frequency:0.001,
运算符:或,
分析器:标准
}
},
过滤器:{
...
}
}
由于停止词出现问题,我想用以下解释的常用条款替换Multi_Match: https://www.elastic.co/blog/stop-stopping-stop-words-a-look-at-common-terms -query
如何将以上 multi_match
替换为常用条款?我不知道如何处理基于常用条款的多个字段的搜索。
谢谢!
在 multi_match
查询中指定 cutoff_frequency
时,您已经在使用条款,如您链接到的博客文章中所述:
常见条款也已被并入Match查询中,可以
通过将cutoff_frequency
设置为0.001
I am using ES 2.0. I have the following filtered query with multi_match
:
{
"filtered" : {
"query": {
"multi_match" : {
"query" : "sleep",
"fields" : ["title.*^10","introduction.*"],
"cutoff_frequency" : 0.001,
"operator" : "or",
"analyzer" : "standard"
}
},
"filter" : {
...
}
}
Because of stop words issue, I would like to replace the Multi_Match with Common Terms explained here: https://www.elastic.co/blog/stop-stopping-stop-words-a-look-at-common-terms-query
How can I just replace the above multi_match
with Common Terms? I cannot figure out how to handle the search on multiple fields based on Common Terms.
Thanks!
When specifying the cutoff_frequency
in your multi_match
query, you're already using common terms, as mentioned in the blog article you linked to:
"Common Terms has also been incorporated into the Match query and can be enabled by setting
cutoff_frequency
to a value like 0.001"
The documentation for match
and multi_match
on cutoff_frequency
also mention this fact.
这篇关于如何将具有Multi_Match的筛选查询转换为通用条款的过滤查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!