• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Steve08
V2EX  ›  程序员

ES 如何动态搜索多层级 json

  •  
  •   Steve08 ·
    qiyue0726 · Jun 14, 2022 · 1816 views
    This topic created in 1429 days ago, the information mentioned may be changed or developed.
    格式是这样的,有个字段 requestParam ,它的类型是 object ,可能存的一个 json 。
    然后我要搜索,正常按 requestParam.fields.userIp 这样可以查出来,但是有可能还有很多层级,es 好像又不支持 requestParam.*.userIp 这样的写法,请问有什么解决办法
    3 replies    2022-06-30 11:54:47 +08:00
    sadfQED2
        1
    sadfQED2  
       Jun 14, 2022 via Android   ❤️ 1
    mult_match ,支持*这样查询
    Steve08
        2
    Steve08  
    OP
       Jun 15, 2022
    @sadfQED2 谢谢,我去看看具体怎么玩
    franpinx2
        3
    franpinx2  
       Jun 30, 2022
    nested query 吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5832 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 01:58 · PVG 09:58 · LAX 18:58 · JFK 21:58
    ♥ Do have faith in what you're doing.