es
来源:互联网 发布:西电物理实验数据 编辑:程序博客网 时间:2024/04/29 03:50
GET /pi/event/_search{ "size": 0, "query" : { "bool": { "must":[ {"match_phrase":{"userId": ${userId}}}, <#if keyword == ""> {"match_all": {}} <#else> {"query_string":{ "default_field": "_all", "query": "${keyword}" } } </#if> ], "filter": { "range":{ "validataTimeSeconds":{ "gte" : ${gte_val}, "lte" : ${lte_val} } } } } }, "aggs":{ "by_time":{ "date_histogram":{ "field":"validataTimeSeconds", "interval":${interval}, "extended_bounds":{ "min":${gte_val}, "max":${lte_val} } }, "aggs":{ "status":{ "terms":{ "field":"status.keyword" } } } } }}
GET pi/event/_search{ "size":0, "query":{ "bool": { "must":[ {"match":{"view.alarmId": "7"}} ] } }, "post_filter" : { "range" : { "validataTimeSeconds" : { "gte" : 1499654928, "lte" : 1499655320 } } }, "aggs":{ "by_time": { "date_histogram" : { "field" : "validataTimeSeconds", "interval" : "100ms", "extended_bounds":{ "min" : 1499654928, "max" : 1499655320 } }, "aggs":{ "event_status_group": { "filters": { "filters": { "NODATA":{ "match_phrase":{ "status":-1 } }, "ALERT":{ "match_phrase":{ "status":0 } }, "OK": { "match_phrase":{ "status":1 } } } } } } } }}
GET /pi/event/_search{ "size": 1000, "_source": { "include": [ "validataTimeSeconds", "validataDate", "status", "alarmId", "host" ] }, "sort": [ { "validataTimeSeconds": { "order": "asc" } }, { "host.keyword": { "order": "asc" } } ], "query": { "bool": { "must": [ { "match_phrase": { "userId": ${userId} } } ], "filter": { "range": { "validataTimeSeconds":{ "gte":${gte_val}, "lte":${lte_val} } } } } }, "aggs": { "host_event_count": { "terms": { "field": "host.keyword" } } }}
GET /pi/event/_search{ "from": ${page}, "size": ${size}, <#if keyword == ""> "sort" :[{ "validataTimeSeconds" : {"order" : "desc"}}], <#else> "sort" :["_score"], </#if> "query" : { "bool": { "must":[ {"match_phrase":{"userId": ${userId}}}, <#if alarmId != ""> {"match_phrase":{"alarmId": ${alarmId}}}, </#if> <#if status != ""> {"match_phrase":{"status.keyword": ${status}}}, </#if> <#if keyword == ""> {"match_all": {}} <#else> { "query_string":{ "default_field": "_all", "query": "${keyword}" } } </#if> ], "filter": { "range":{ "validataTimeSeconds":{ "gte" : ${gte_val}, "lte" : ${lte_val} } } } } }}
scroll 分页
GET /pi/event/_search?scroll=1m&size=1000{ "_source": { "include": [ "validataTimeSeconds" ] }, "sort": [ { "validataTimeSeconds": { "order": "asc" } }, { "host.keyword": { "order": "asc" } } ], "query": { "bool": { "must": [ { "match_phrase": { "userId": 1 } }, { "match_phrase": { "alarmId": 32 } } ], "filter": { "range": { "validataTimeSeconds":{ "gte":1502084909, "lte":1502171309 } } } } }, "aggs": { "host_event_count": { "terms": { "field": "host.keyword" } } }}GET /_search/scroll{ "scroll":"1m", "scroll_id":"DnF1ZXJ5VGhlbkZldGNoBQAAAAAAALjaFkwtQllyZHIzVEtLMTd6TkRYTTF2VEEAAAAAAAC43BZMLUJZcmRyM1RLSzE3ek5EWE0xdlRBAAAAAAAAuNgWTC1CWXJkcjNUS0sxN3pORFhNMXZUQQAAAAAAALjZFkwtQllyZHIzVEtLMTd6TkRYTTF2VEEAAAAAAAC42xZMLUJZcmRyM1RLSzE3ek5EWE0xdlRB"}
阅读全文
0 0
- es
- es
- es
- es
- ES
- es
- es
- es
- es
- ES
- es
- 【es】es避坑小餐
- OPENGL ES
- OpenGL ES
- OpenGL ES
- opengl es
- OpenGL ES
- OpenGL ES
- Xcode真机调试出现“* is busy: Processing symbol files”
- node单线程异步,基于事件驱动的理解
- HTML学习笔记 -- day01 p、h、a、img标签简介
- eclipse快捷键
- 笔记图片
- es
- FlexBox
- JavaScript 资源大全中文版
- h5<video>有图像没声音或有声音没图像
- Codeforces 835 B The number on the board
- 使用适合自己的html5 开发方式
- Ubuntu14.04中安装nodejs及其代码环境配置
- LeetCode
- python_控制台输出带颜色的文字方法