3

咨询一个 ES 的问题

 2 years ago
source link: https://www.v2ex.com/t/860782
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

咨询一个 ES 的问题

  lslvxy · 4 小时 35 分钟前 · 1080 次点击

一个业务系统之前用的是 ES6.x 的,查询里的 filter 写的是

{
  terms:{
    eventName:[
    "xxx"
    ]
  }
}

然后换了个 ES7.x 的版本 这个查询就查不到数据了 要改成

{
  terms:{
    eventName.keyword:[
    "xxx"
    ]
  }
}

eventName 要改成 eventName.keyword 才有数据 请问这个查询怎么兼容,我翻了一下 es 的更新日志也没有发现相关的变更项


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK