使用ElasticDump迁移数据,报错trying to auto create mapping, but dynamic mapping is disabled 个人解决方法
Oct 11, 2017
- 近日公司老机房网络一直异常,于是和运维确认迁移服务到新机房。Es服务内有将近1Y的数据量,使用ElasticDump迁移数据。
- 报错trying to auto create mapping, but dynamic mapping is disabled.
- 解决方法:
- 若使用动态mapping,可在新建index时,修改mapping属性为”index.mapper.dynamic”:true,(index.mapper.dynamic这个是动态索引开关,如果关闭,那么你新写入一个索引或者存在的一个索引新增一个字段,你又没提前定义好mapping,那么这次写入将会被拒绝)。
- 若不想使用动态mapping,可按照原来index属性新建,特别注意的是请勿迁移之前,手动用其它方法在新建的index导入任何数据,否则会报错trying to auto create mapping, but dynamic mapping is disabled。
- 参考链接:
- ElasticSearch使用ElasticDump迁移数据报错,已解决报错,仍其他问题帮忙看看。