即使查询和数据中的时间格式相同,ES仍未给出任何结果,您能否检查并更正我在处理Java中的java.sql.Time对象时遇到的任何错误
查询示例如下:
GET /regularride/regularride/_search
{
"size": 5000,
"query": {
"bool": {
"filter": [
{
"range": {
"monday": {
"lt": "10:36:00 AM"
}
}
},
{
"range": {
"monday": {
"gt": "08:36:00 AM"
}
}
}
]
}
}
}
,数据库中的可用数据如下所示:
{"took":1,"timed_out":false,"_shards":{"total":3,"successful":3,"skipped":0,"failed":0},"hits":{"total":45,"max_score":1,"hits":[{"_index":"regularride","_type":"regularride","_id":"26201","_score":1,"_source":{"vehicleNumber":"5656","vehicleModel":"Hatch Back","farePerKm":4,"availableSeats":4,"noOfPassengers":0,"vehicleType":"Car","cumOverlapDist":0,"riderHasHelmet":false,"fromDate":"Nov 28, 2018, 12:00:51 AM","processedDate":"Dec 11, 2018, 12:01:51 AM","duration":51,"monday":"10:06:00 AM","tuesday":"10:06:00 AM","wednesday":"10:06:00 AM","thursday":"10:06:00 AM","friday":"10:06:00 AM","dateType":"ALL"}},{"_index":"regularride","_type":"regularride","_id":"26606","_score":1,"_source":{"vehicleNumber":"cufufu","vehicleModel":"Hatch Back","farePerKm":4,"availableSeats":4,"noOfPassengers":0,"vehicleType":"Car","cumOverlapDist":0,"riderHasHelmet":false,"fromDate":"Nov 29, 2018, 12:00:00 AM","processedDate":"Dec 11, 2018, 12:01:00 AM","duration":24,"monday":"07:07:00 AM","tuesday":"07:07:00 AM","wednesday":"07:07:00 AM","thursday":"07:07:00 AM","friday":"07:07:00 AM"}}]}}