es查询语法
程序员文章站
2022-07-06 16:14:55
...
1.select streamId,flowId, dataGeneratedTs,dataProcessTs,doneTs,feedbackTime,rddTs,sinkTs,swiftsTs from wormhole_feedback_2_adx where flowId = 23704 and dataProcessTs >= "2020-12-08 11:00:00.000000+0800" and dataProcessTs <= "2020-12-08 12:00:00.000000+0800" order by dataGeneratedTs desc limit 3
GET /wormhole_feedback_2_adx/_search
{
"size": 3,
"_source": {
"includes": [
"streamId",
"flowId",
"dataGeneratedTs",
"dataProcessTs",
"doneTs",
"feedbackTime",
"rddTs",
"sinkTs",
"swiftsTs"
]
},
"query": {
"bool": {
"must": [
{
"match": {
"flowId": 23704
}
},
{
"range": {
"dataProcessTs": {
"gte": "2020-12-08 11:00:00.000000+0800",
"lte": "2020-12-08 12:00:00.000000+0800"
}
}
}
]
}
},
"sort": [
{
"dataGeneratedTs":{
"order": "desc"
}
}
]
}
下一篇: 如何提升ListView的运行效果