POST kibana_sample_data_flights-1227/_search
{
"from": 0,
"size": 20,
"query": {
"match": {
"DestRegion": "SE"
}
},
"highlight": {
"fields": {
"DestRegion": {}
},
"pre_tags": "ffd",
"post_tags": "fdfdf",
"fragment_size": 10
},
"sort": [
{
"timestamp": {
"order": "desc"
}
}
]
}
#嵌套,實現了 should not 邏輯
POST /products/_search
{
"query": {
"bool": {
"must": {
"term": {
"price": "200"
}
},
"should": [
{
"bool": {
"must_not": {
"term": {
"avaliable": "false"
}
}
}
}
],
#至少匹配多少
"minimum_should_match": 2
}
}
}