nonea
V2EX  ›  问与答

es 语法问题

  •  
  •   nonea · Mar 6, 2020 · 1013 views
    This topic created in 2453 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"}}}

    感谢!

    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   932 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 20:31 · PVG 04:31 · LAX 12:31 · JFK 15:31
    ♥ Do have faith in what you're doing.