Elasticsearch更新索引模板 [英] Elasticsearch update index template

查看:1181
本文介绍了Elasticsearch更新索引模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于Elasticsearch索引模板的问题,有一个问题的场景。

I have a question about elasticsearch index template, there is a scene of my question.

为一系列索引创建一个名为的模板templateA ,并且从该模板创建了一些索引,分别为 Index-yyyy.mm.dd2 Index-yyyy .mm.dd2 。一段时间后,我需要在indice中创建一些新字段,然后更新 templateA

Create a template for a series indices, named templateA, and there are some indices create from this template, named Index-yyyy.mm.dd2 and Index-yyyy.mm.dd2. After a period of time, I need create some new fields in indice, and I update the templateA.

SO ,如何使先前创建的索引使用新模板?请给我一些建议。非常感谢!

SO, How to make the previously created indices use the new template? please give me some suggestion. Thanks a lot!

推荐答案

该模板仅在创建索引时使用。您必须修改映射或重新创建索引,然后重新索引您的数据。

The template is only used at index creation. You'll have to modify your mapping or recreate your index and reindex your data.

您可以使用 PUT映射API 来修改您的映射。

You can use the PUT mapping API to modify your mapping.

这篇关于Elasticsearch更新索引模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆