GET /waiter/_doc/_search
{
"query":{
"match":{
"name":"zhengjie"
}
},
"from":1,
"size":2,
"sort":{
"age":{
"order":"desc"
}
}
}



//注意点:should 是个数组
GET /waiter/_doc/_search
{
"query":{
"bool":{
"should":[{
"match":{
"name":"zhengjie"
}
},
{
"match":{
"age":34
}
}
]
}
}
}

//加了filter
{
"query":{
"bool":{
"should":[{
"match":{
"name":"zhengjie"
}
},
{
"match":{
"age":33
}
}
]
,
"filter":{
"range":{
"age":{
"gte":33
}
}
}
}
}
}

//加高亮
{
"query":{
"bool":{
"should":[{
"match":{
"name":"zhengjie"
}
},
{
"match":{
"age":33
}
}
]
,
"filter":{
"range":{
"age":{
"gte":33
}
}
}
}
},
"highlight":{
"fields":{
"name":{}
}
}
}


// _source
{
"query":{
"bool":{
"should":[{
"match":{
"name":"zhengjie"
}
},
{
"match":{
"age":33
}
}
]
}
},
"_source":["name","age"]
}

//聚合
{
"query":{
"bool":{
"should":[{
"match":{
"name":"zhengjie"
}
},
{
"match":{
"age":33
}
}
]
}
},
"aggs":{
"my_sum":{
"sum":{
"field":"age"
}
}
}
}
{
"query":{
"bool":{
"should":[
{
"match":{
"content":"乡村爱情"
}
},
{
"match":{
"author":"张老三"
}
}
],
"filter":{
"range":{
"name":{
"gte":23
}
}
}
}
},
"from":0,
"size":10,

"sort":{
"price":{
"order":"desc"
}
},
"_source":["name","publish"],
"highlight":{
"fields":{
"name":{}
}
},
"aggs":{
"my_sum":{
"sum":{
"field":"price"
}
}
}

}