elasticsearch - 如何在 ElasticSearch 上按当前时间过滤 integer_range 字段?
问题描述
我的索引映射是这样的:
"availableHours" : {
"type" : "integer_range"
}
一个样本是:
"availableHours" : [
{
"gte" : "61000",
"lte" : "62200"
},
{
"gte" : "71100",
"lte" : "72300"
},
]
Format: which day of the week/hour/minute
我想按当前时间过滤 integer_range 字段。但我不能给出当前时间。我应该从 ElasticSearch 获取当前时间。
是否可以通过查询来做到这一点?
解决方案
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html
我不确定你想要得到什么,但我认为如果你能给出更多解释的例子,这个页面会对你有所帮助我想我可以给你你正在寻找的确切查询
推荐阅读
- c - 在 C 中重定向程序输出,使用 fprintf 还是“更广泛使用”的解决方案?
- react-native - 无法使用 vscode 将 weights.bin 导入本机反应
- unity3d - 为什么我的 Unity 2d 游戏中的灯一直闪烁?
- python - 如何在 tkinter 中保存事件?
- list - F# If 语句类型不匹配
- batch-file - 如何使用数组和绝对目录创建批处理循环?
- android - 当创建它的参数更改时,如何使 Android Jetpack Compose AndroidView 被替换?
- python - 如何找到在 Linux 上运行 Python3 的显示器的分辨率?
- angular - 如何以角度从firebase获取和操作现有数据
- r - 在 IF 条件下限制向量的 2 个边界