簡體   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