V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ss098
V2EX  ›  Elasticsearch

ElasticSearch 如何精确匹配字符串

  •  
  •   ss098 · 2015-07-06 20:37:03 +08:00 · 7790 次点击
    这是一个创建于 3189 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我试过 Term 跟 multi_match 很多方法,都不能达成效果。

    我希望提交的 Keyword 是等于任意一列的值。

    比如提交 test,那么就在该行中的任意一列等于 test。

    5 条回复    2015-07-07 13:38:03 +08:00
    lins05
        2
    lins05  
       2015-07-06 22:18:20 +08:00   ❤️ 1
    必须在 mapping 里指定 `"index": "not_analyzed"`
    levon
        3
    levon  
       2015-07-06 22:46:38 +08:00   ❤️ 1
    Term 中文有问题,英文应该是好的
    pixstone
        4
    pixstone  
       2015-07-07 02:16:39 +08:00 via iPhone   ❤️ 1
    中文也可以的 用 mm值限定。must match
    hh4062703
        5
    hh4062703  
       2015-07-07 13:38:03 +08:00   ❤️ 1
    使用 phase query
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2820 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:23 · PVG 21:23 · LAX 06:23 · JFK 09:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.