You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<3> Document 1 matches even though it contains only `brown`, not `dog`.
61
+
<3> 文档 1 也能匹配,尽管它只有 `brown` 没有 `dog` 。
66
62
67
-
Because the `match` query has to look for two terms—`["brown","dog"]`—internally it has to execute two `term` queries and combine their individual
68
-
results into the overall result. To do this, it wraps the two `term` queries
69
-
in a `bool` query, which we examine in detail in <<bool-query>>.
Matching any document that contains _any_ of the query terms may result in a
79
-
long tail of seemingly irrelevant results. ((("full text search", "multi-word queries", "improving precision")))((("precision", "improving for full text search multi-word queries"))) It's a shotgun approach to search.
80
-
Perhaps we want to show only documents that contain _all_ of the query terms.
81
-
In other words, instead of `brown OR dog`, we want to return only documents
82
-
that match `brown AND dog`.
70
+
用 _任意_ 查询词项匹配文档可能会导致结果中出现不相关的长尾。((("full text search", "multi-word queries", "improving precision")))((("precision", "improving for full text search multi-word queries")))这是种散弹式搜索。可能我们只想搜索包含 _所有_ 词项的文档,也就是说,不去匹配 `brown OR dog` ,而通过匹配 `brown AND dog` 找到所有文档。
83
71
84
-
The `match` query accepts an `operator` parameter((("match query", "operator parameter")))((("or operator", "in match queries")))((("and operator", "in match queries"))) that defaults to `or`.
85
-
You can change it to `and` to require that all specified terms must match:
The `match` query supports((("match query", "minimum_should_match parameter")))((("minimum_should_match parameter"))) the `minimum_should_match` parameter, which allows
121
-
you to specify the number of terms that must match for a document to be considered
122
-
relevant. While you can specify an absolute number of terms, it usually makes
123
-
sense to specify a percentage instead, as you have no control over the number of words the user may enter:
0 commit comments