1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 20:52:22 +00:00
This commit is contained in:
Xargin 2018-07-11 12:11:53 +08:00
parent f75bed0fc3
commit b76317b9d0

View File

@ -97,35 +97,40 @@ es 定义了一套查询 DSL当我们把 es 当数据库使用时,需要用
{ {
"query": { "query": {
"bool": { "bool": {
"must": [{ "must": [
{
"match": { "match": {
"field_1": { "a": {
"query": "1", "query": "1",
"type": "phrase" "type": "phrase"
} }
} }
}, { },
{
"match": { "match": {
"field_2": { "b": {
"query": "2", "query": "2",
"type": "phrase" "type": "phrase"
} }
} }
}, { },
{
"match": { "match": {
"field_3": { "c": {
"query": "3", "query": "3",
"type": "phrase" "type": "phrase"
} }
} }
}, { },
{
"match": { "match": {
"field_4": { "d": {
"query": "4", "query": "4",
"type": "phrase" "type": "phrase"
} }
} }
}] }
]
} }
}, },
"from": 0, "from": 0,