V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
nonea
V2EX  ›  问与答

es 语法问题

  •  
  •   nonea · 2020-03-06 14:36:40 +08:00 · 534 次点击
    这是一个创建于 1527 天前的主题,其中的信息可能已经有所发展或是发生改变。

    es 节点也发了,担心大家看不到 再发一次 我想卡 business_time 字段查询 180 天内的数据,并且卡 subject_type=BIGCUSTOMER 这部分的数据

    用 sql 语言是:select * from XX where business_time>=sysdate(-180) and subject_type='BIGCUSTOMER'

    es 语法如下这么写为什么跑出来是 0 啊 ?

    {"query":{"range":{"business_time":{"gte":"${fmt(add(NTIME(),-180,'day'),'yyyy-MM-dd')}"}},"term":{"subject_type":"BIGCUSTOMER"}}}

    感谢!

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2671 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:34 · PVG 12:34 · LAX 21:34 · JFK 00:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.