diff --git a/ch6-cloud/ch6-x-dist-search-engine.md b/ch6-cloud/ch6-x-dist-search-engine.md index 35c5f70..ecc3a45 100644 --- a/ch6-cloud/ch6-x-dist-search-engine.md +++ b/ch6-cloud/ch6-x-dist-search-engine.md @@ -97,38 +97,43 @@ es 定义了一套查询 DSL,当我们把 es 当数据库使用时,需要用 { "query": { "bool": { - "must": [{ - "match": { - "field_1": { - "query": "1", - "type": "phrase" + "must": [ + { + "match": { + "a": { + "query": "1", + "type": "phrase" + } + } + }, + { + "match": { + "b": { + "query": "2", + "type": "phrase" + } + } + }, + { + "match": { + "c": { + "query": "3", + "type": "phrase" + } + } + }, + { + "match": { + "d": { + "query": "4", + "type": "phrase" + } } } - }, { - "match": { - "field_2": { - "query": "2", - "type": "phrase" - } - } - }, { - "match": { - "field_3": { - "query": "3", - "type": "phrase" - } - } - }, { - "match": { - "field_4": { - "query": "4", - "type": "phrase" - } - } - }] + ] } }, "from": 0, "size": 1 } -``` +``` \ No newline at end of file