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

有懂 elasticsearch 的吗,这样的数据结构如何索引查询

  •  
  •   qnsh · Oct 20, 2021 · 1786 views
    This topic created in 1652 days ago, the information mentioned may be changed or developed.
    {
        "sheets": {
            "Sheet1": {
                "name": "Sheet1",
                "data": {
                    "dataTable": {
                        "0": {
                            "0": {
                                "value": 0
                            }
                        },
                        "1": {
                            "1": {
                                "value": 0,                           
                                "formula": "A1+B1"
                            }
                        }
                    }
                },
                "index": 0
            },
            "Sheet2": {
                "name": "Sheet2",
                "data": {
                    "dataTable": {
                        "0": {
                            "0": {
                                "value": 0,
                                "formula": "C1+D1"
                            }
                        }
                    }
                },
                "index": 1
            }
        }
    }
    

    数据格式如上,要查询 formula 包含"A1"的应该怎么操作。

    3 replies    2021-10-22 15:52:27 +08:00
    urlk
        1
    urlk  
       Oct 20, 2021   ❤️ 1
    结构有问题吧 ? 存的时候字段要统一呀
    SjwNo1
        2
    SjwNo1  
       Oct 20, 2021   ❤️ 1
    nested query,但是你这个 dataTable Item 不固定有点蛋疼啊,建议改数据结构
    leafre
        3
    leafre  
       Oct 22, 2021 via Android
    nested + bool
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3118 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:18 · PVG 22:18 · LAX 07:18 · JFK 10:18
    ♥ Do have faith in what you're doing.