0
私はcutoff_frequencyと "and"演算子を組み合わせたelasticsearchクエリを見つけましたが、これは私には意味がありません。弾性検索:cutoff_frequencyとand演算子を組み合わせますか?
これはブールクエリの一部です:
{
"match": {
"content": {
"query": "I has candy and cake",
"cutoff_frequency": 0.001,
"operator": "and"
}
}
}
そしてcutoff_frequencyがします。このマニュアルに従って、(文書に依存しますが、最も可能性が高い)、以下にこれを変換します。
{
"bool": {
"must": {
"bool": {
"should": [
{ "term": { "text": "candy" }},
{ "term": { "text": "cake" }}
]
}
},
"should": {
"bool": {
"should": [
{ "term": { "text": "I" }},
{ "term": { "text": "has" }},
{ "term": { "text": "and" }}
]
}
}
}
}
しかし、 "and"演算子がクエリに追加されているとどうなりますか?これは "cutoff_frequency"が効果がないことを意味しますか?
"はい、両方の用語に一致する場合にのみ" を答えます上記の頻度の高い用語(I、has、and)は、私の低頻度の用語(キャンディー、ケーキ)がすべて文書に含まれている場合にのみスコアリングに貢献しますか? –