2014-08-29 32 views
0

我需要將Elasticsearch索引從遠程主機移動到本地主機。有一點研究讓我找到了一個名爲elasticdump的工具,這個工具似乎是正確的。作爲其GitHub的頁面上指定的,我跑以下命令:移動Elasticsearch索引後沒有搜索命中

elasticdump --input=http://remote_host/index_name --ouput=http://localhost/index_name 

它運行後,本地索引確實包含來自遠程一個文件。但是,當我對本地Elasticsearch的搜索API提出查詢時,我得不到任何結果,而同樣的查詢在提交給遠程Elasticsearch API時返回幾個匹配。

使本地搜索API起作用需要什麼?

+0

是否GET HTTP://遠程主機/ INDEX_NAME/_mapping匹配http:// localhost/index_name/_mapping?文檔說它應該複製它,但檢查它...映射/設置是否也引用一些外部文件,如同義詞文件或字典文件?有沒有被複制的別名?磁盤上是否存在未被複制的腳本?這裏沒有足夠的信息來說明發生了什麼。 – Alcanzar 2014-08-29 13:35:07

回答

0

現在有一個映射導入/導出標誌,你可以用elasticdump使用,這可能是問題:

  • elasticdump --input=http://production.es.com:9200/my_index --output=http://staging.es.com:9200/my_index --type=mapping
  • elasticdump --input=http://production.es.com:9200/my_index --output=http://staging.es.com:9200/my_index --type=data