ksaa0096329

问个 ES 搜索的问题

  •  
  •   ksaa0096329 · Apr 30, 2020 · 5409 views
    This topic created in 2230 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   ·   1158 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 18:27 · PVG 02:27 · LAX 11:27 · JFK 14:27
    ♥ Do have faith in what you're doing.