繁体   English   中英

使用较新版本的 Elasticsearch Index

[英]Use Elasticsearch Index from newer Version

是否可以使用(例如重新索引)来自较新 Elasticsearch 版本的现有索引? 我试图通过快照 API 来做到这一点,但失败了:

快照是使用 Elasticsearch 版本 [7.5.0] 创建的,该版本高于此节点的版本 [7.4.2]

我们需要使用较新的索引的原因是我们想用一个新版本尚不可用的插件进行试验,但必须在由较新版本索引的数据上进行试验。

快照 API 将不起作用,因为您尝试在比创建索引的实例更旧的实例上恢复索引。

您需要在 7.5 实例上拥有索引数据,并在 7.4.2 实例上使用reindex API 从远程重新索引

它是这样的:

POST _reindex
{
  "source": {
    "remote": {
      "host": "http://7-5-remote-host:9200"
    },
    "index": "source"
  },
  "dest": {
    "index": "dest"
  }
}

您还可以使用 logstash 管道从 7.5 实例中读取数据并在 7.4.2 实例上建立索引。

像这样的东西:

input {
  elasticsearch {
    hosts => "http://7-5-instance:9200"
    index => "your-index"
  }
}
output {
  elasticsearch {
    hosts => "http://7-4-instance:9200"
    index => "your-index"
  }
} 

暂无
暂无

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

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