美文网首页
es数据库 简单查询

es数据库 简单查询

作者: 刘东青_6f21 | 来源:发表于2020-01-10 10:54 被阅读0次

{

"size": 0,
"query": {
    "bool": {
        "must": [{
            "range": {
                "start_time": {
                    "gte": "2020/01/08 19:56:00",
                    "lte": "2020/01/08 21:00:00"
                }
            }
        }]
    }
},
"aggs": {
    "equ_name": {
        "terms": {
            "field": "equ_name.keyword"
        } 
    }
}

}

select equ_name,count(*) from xxx where start_time between xx and xx group by equ_name

相关文章

网友评论

      本文标题:es数据库 简单查询

      本文链接:https://www.haomeiwen.com/subject/wvspactx.html