现在有个数据,字段如下
id expired create_time
需求是筛选出 创建时间+过期时间(秒)<系统当前时间
,如果是sql语句的话很简单就是:
select * from table where DATE_ADD(create_time,INTERVAL expired SECOND) < now();
请问在es中应该怎么查询呢?
现在有个数据,字段如下
id expired create_time
需求是筛选出 创建时间+过期时间(秒)<系统当前时间
,如果是sql语句的话很简单就是:
select * from table where DATE_ADD(create_time,INTERVAL expired SECOND) < now();
请问在es中应该怎么查询呢?
1 回答2.7k 阅读
1 回答1.2k 阅读
已经解决了,用
script
来查询: