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

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

  •  1
     
  •   rizon ·
    othorizon · Aug 16, 2019 · 2393 views
    This topic created in 2539 days ago, the information mentioned may be changed or developed.

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

    4 replies    2019-08-16 13:07:01 +08:00
    habicat
        1
    habicat  
       Aug 16, 2019
    不能吧 我们做同样的事是先导本地在用脚本的
    Rush9999
        2
    Rush9999  
       Aug 16, 2019
    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  
       Aug 16, 2019
    5.x 以后有 reindex
    kiddingU
        4
    kiddingU  
       Aug 16, 2019
    reindex
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1691 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 16:18 · PVG 00:18 · LAX 09:18 · JFK 12:18
    ♥ Do have faith in what you're doing.