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

大家在 elasticsearch 里面是怎么存储数据的

  •  
  •   ufo22940268 · Dec 8, 2016 · 9400 views
    This topic created in 3441 days ago, the information mentioned may be changed or developed.

    就是在存储数据的时候涉及到 SQL Join 的,大家是怎么处理的呢?

    我现在知道的有两种方式

    1. nest. 就是嵌套的形式,先把数据 populate 出来,然后把关联关系放在同一条数据里面。
    2. parent-child mapping. 用 elasticsearch 的 parent-child mapping, 在上传的时候就指定好对应的关系。

    我现在用的是 1 解决方案,有没有人用 2 的?我感觉每次上传数据的时候要设置 mapping 很麻烦。

    我现在的开发环境是 mongodb , nodejs

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3412 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:58 · PVG 19:58 · LAX 04:58 · JFK 07:58
    ♥ Do have faith in what you're doing.