V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
rizon
V2EX  ›  程序员

es 可以把一张表的聚合结果直接写入另一张表中吗

  •  1
     
  •   rizon ·
    othorizon · 2019-08-16 11:23:36 +08:00 · 1473 次点击
    这是一个创建于 1712 天前的主题,其中的信息可能已经有所发展或是发生改变。

    就是有没有办法不用先查询到本地,而是直接写到另一张表。 比如通过脚本什么的。

    4 条回复    2019-08-16 13:07:01 +08:00
    habicat
        1
    habicat  
       2019-08-16 11:31:59 +08:00
    不能吧 我们做同样的事是先导本地在用脚本的
    Rush9999
        2
    Rush9999  
       2019-08-16 12:31:45 +08:00
    https://www.elastic.co/guide/en/elasticsearch/reference/7.3/docs-reindex.html
    POST _reindex
    {
    "source": {
    "index": "twitter",
    "query": {
    "term": {
    "user": "kimchy"
    }
    }
    },
    "dest": {
    "index": "new_twitter"
    }
    }
    672795574
        3
    672795574  
       2019-08-16 13:03:15 +08:00
    5.x 以后有 reindex
    kiddingU
        4
    kiddingU  
       2019-08-16 13:07:01 +08:00
    reindex
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   960 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:22 · PVG 05:22 · LAX 14:22 · JFK 17:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.