V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ksaa0096329

问个 ES 搜索的问题

  •  
  •   ksaa0096329 · Apr 30, 2020 · 4659 views
    This topic created in 2199 days ago, the information mentioned may be changed or developed.

    一个会员索引,一条 ES 文档

    {
    	"id": "会员的 ID",
        "tag": ["tag1","tag2","tag3"]
    }
    

    我现在想要做到这样的表达式: tag1+tag2-tag3+tag4,不知道在 ES 中怎么办到. 使用 Bool 查询的 must 和 must_no 能做到 tag1+tag2+tag4-tag3 实在想不到解决方案,问问大家有没有遇到过这种问题

    1 replies    2020-05-01 08:21:13 +08:00
    Kobayashi
        1
    Kobayashi  
       May 1, 2020 via Android
    我语文不好。没明白你到底利用 bool 实现没?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   966 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:18 · PVG 05:18 · LAX 14:18 · JFK 17:18
    ♥ Do have faith in what you're doing.