nonea
V2EX  ›  问与答

es 语法问题

  •  
  •   nonea · Mar 6, 2020 · 816 views
    This topic created in 2270 days ago, the information mentioned may be changed or developed.

    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"}}}

    感谢!

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5014 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 04:03 · PVG 12:03 · LAX 21:03 · JFK 00:03
    ♥ Do have faith in what you're doing.