nonea
V2EX  ›  问与答

es 语法问题

  •  
  •   nonea · Mar 6, 2020 · 961 views
    This topic created in 2423 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   ·   Privacy   ·   Solana   ·   2311 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 10:25 · PVG 18:25 · LAX 03:25 · JFK 06:25
    ♥ Do have faith in what you're doing.