简体   繁体   English

elasticsearch:重新索引索引

[英]elasticsearch: reindexing an index

I have an index which a few fields as keyword type.我有一个索引,其中有几个字段作为关键字类型。 I need ot have these fields as text instead now.我现在不需要将这些字段作为文本。

Going through documentation , it seems to be not possible.通过文档,这似乎是不可能的。

Documentation instead asks to create a new index and reindex it with documents from older index.文档反而要求创建一个新索引并使用旧索引中的文档重新索引它。

Can I keep new index name same as old one?我可以保持新索引名称与旧索引名称相同吗? Won't it cause issues during reindexing process?它不会在重新索引过程中引起问题吗?

no, you need to reindex to an index with a different name.不,您需要重新索引到具有不同名称的索引。 One thing you could do, is to (1) reindex to eg original_index_name_v2 , (2) create an index alias named original_index_name catching original_index_name_* indices, (3) delete the original index.您可以做的一件事是(1)重新索引到例如original_index_name_v2 ,(2)创建一个名为original_index_name索引别名来捕获original_index_name_*索引,(3)删除原始索引。 This way, next time you'll need to change the mapping, you don't need to change the index name but just keep querying the same alias这样,下次您需要更改映射时,您不需要更改索引名称,只需继续查询相同的别名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM