elasticsearch kabana中创建索引

在kabana中创建索引和索引类型语法

PUT clockin
{
"mappings": {
"time": {

}
}
}

查询索引下的所有数据

GET clockin/_search
{
"query": {
"match_all": {}
}
}

删除索引

DELETE clockin

通过uuid查询和时间倒序查询

GET test/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"uuid": "050058"
}
}
]
}
},
"sort": {
"time": {
"order": "desc"
}
},
"size": 1000
}

//通过时间段查询和时间倒序排序

扫描二维码关注公众号,回复: 3168325 查看本文章

GET test/_search
{
"query": {
"bool": {
"must": [{
"range": {
"time": {
"gte": "2018-09-14T07:00:00",
"lte": "2018-09-14T23:30:00"
}
}
}]

}
},
"sort": {
"time": {
"order": "desc"
}
},

"size": 10000
}

猜你喜欢

转载自www.cnblogs.com/lizihao/p/9641416.html
今日推荐