简体   繁体   English

用Curator重新索引所有ElasticSearch?

[英]Reindex all of ElasticSearch with Curator?

Is there a Recipe out there to Reindex all ElasticSearch Indices with Curator? 是否有食谱来用Curator重新索引所有ElasticSearch索引?

I'm seeing that it can Reindex a set of indices into one (Daily to Month use case), however I don't see anything that would suggest it could easily apply a new mapping file to every Elastic Index. 我看到它可以将一组索引重新索引为一个索引(每日使用案例),但是我看不到任何暗示它可以轻松地将新的映射文件应用于每个Elastic Index的信息。

I'm taking a guess I'll need to write a wrapper script around Curator to grab index names and feed them into Curator. 我猜想我需要围绕Curator编写一个包装器脚本以获取索引名并将其输入到Curator中。

I don't know if I got you right as you mentioned reindexing and mapping changes... 当您提到重新索引和映射更改时,我不知道我是否正确...

If you want to set/update a mapping in a collection of indices and if you know the indices to update by name (or pattern), you are able to apply the same mapping or a mapping change at once with https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#_multi_index_2 如果要设置/更新索引集合中的映射,并且知道要按名称(或模式)更新的索引,则可以通过https:// www一次应用相同的映射或映射更改。 elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#_multi_index_2

For reindexing, there is no way to specify multiple source/target pairs at once but you can split one index into many. 对于重新编制索引,无法一次指定多个源/目标对,但是您可以将一个索引分成多个。 But as you sugessted, you can use subsequent calls to the reindex api. 但是,当您建议时,可以使用对reindex api的后续调用。

BTW: The reindex api does not copy the settings nor mappings from the source into the destination index. 顺便说一句:reindex api不会将设置或映射从源复制到目标索引。 You need to handle it by yourself, maybe using https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html 您需要自己处理,也许使用https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-templates.html

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

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