| 查询类型 | match(单字段)/ match_phrase(短语)/ multi_match(多字段) |
|---|---|
| 关键选项 | operator(or/and)、minimum_should_match、fuzziness、analyzer |
示例
示例
GET /my-index/_search
{
"query": {
"match": {
"message": {
"query": "quick brown fox",
"operator": "and"
}
}
}
}match 不约束词序,仅要求词条出现;短语按序匹配要用 match_phrase,允许间隔用其 slop 参数。