elasticsearch 查询语句
包含分页、单条件查询、多条件查询、高亮、排序、精准匹配
{
"query": {
"bool": {
"must": [
{
"query_string": {
"fields": [
"source"
],
"query": "zk"
}
},
{
"query_string": {
"fields": [
"sid"
],
"query": "f2d3b6190"
}
},
{
"query_string": {
"fields": [
"session",
"level",
"name",
"content"
],
"query": "refused"
}
},
{
"match_phrase": {
"content": {
"query": ""
}
}
},
{
"range": {
"tnum": {
"lte": "now-5m",
"gte": "now-5h"
}
}
}
]
}
},
"highlight": {
"pre_tags": [
"<hight>"
],
"post_tags": [
"</hight>"
],
"fields": {
"*": {}
}
},
"from": 0,
"size": 100,
"sort": [
{
"time": "desc"
}
]
}