1 回答
TA贡献1793条经验 获得超6个赞
我是elasticsearch的新手,我在elasticsearch中有一个文档,文档包含大量用户视图,现在我想删除那些早于3小时的视图,为此我在elasticsearch中编写了以下查询
POST {INDEX}/_delete_by_query
{
"query": {
"bool": {
"must": [
{
"term": {
"type": "box_views"
}
},
{
"query": {
"range": {
"@created_at": {
"gte": "now-3h"
}
}
}
}
]
}
}
}
当我执行此查询时,我收到以下错误
{ "error": { "root_cause": [ { "type": "parsing_exception", "reason": "no [query] 注册 [query]", "line": 1, "col": 66 } ], "type": "parsing_exception", "reason": "没有为 [query] 注册的 [query]", "line": 1, "col": 66 }, "status": 400 }
- 1 回答
- 0 关注
- 159 浏览
添加回答
举报