V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
thMaster
V2EX  ›  问与答

求助,使用 Easy-es 重建 ES 索引失败

  •  
  •   thMaster · 2023-03-20 16:04:02 +08:00 · 670 次点击
    这是一个创建于 374 天前的主题,其中的信息可能已经有所发展或是发生改变。

    ES 上已经有了一个老的索引 t_test, 但是索引的映射有些问题,我需要把映射字段的 type 修改为 keyword

    Easy-es 有一个自动托管索引平滑模式,说是可以进行索引重建,使用之后发现,确实新建了一个 t_test_s0 ,并且索引的映射符合我的要求,但是在数据从 t_test 迁移到 t_test_s0 的过程中产生了报错

    process index exception,java.util.concurrent.CompletionException: com.xpc.easyes.core.exception.EasyEsException: reindex exception oldIndexName:t_test, releaseIndexName: t_test_s0
    Unfortunately, auto process index by Easy-Es failed, please check your configuration
    

    查阅了一遍文档、ChatGPT 和 NewBing ,尝试了修改 easy-es 的 socket-timeout ,使用 7.14.0 版本的 es 库,手动删除老索引并重建新索引,但总是卡在这一步,不知道是哪里出了问题

    ES 版本 7.10.0

    Easy-ES 版本 0.9.20

    SpringBoot 版本 2.4.13

    thMaster
        1
    thMaster  
    OP
       2023-03-21 11:42:50 +08:00
    懂了,Easy-es 的平滑索引迁移并不支持新旧索引映射不同的情况,所以我现在做法是,把老的索引连带数据一同删掉,新建正确映射的索引,并从备份中恢复数据
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1168 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 18:28 · PVG 02:28 · LAX 11:28 · JFK 14:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.