jprante / elasticsearch-knapsack

Knapsack plugin is an import/export tool for Elasticsearch
Apache License 2.0
472 stars 77 forks source link

Renaming index using java API #72

Open phani546 opened 9 years ago

phani546 commented 9 years ago

Hi Jorg,

please suggest me how to achieve index renaming and update mapping name features using knapsack API please post any example how to use knapsack Java API.I am using elastic search 5.1.2 version. is this feature (rename index and rename mapping) Possible using knapsack Java API.

Thanks phani

jprante commented 9 years ago

As a starting point, check https://github.com/jprante/elasticsearch-knapsack/blob/master/src/test/java/org/xbib/elasticsearch/plugin/knapsack/KnapsackImportTests.java

Then, check https://github.com/jprante/elasticsearch-knapsack/blob/master/src/main/java/org/xbib/elasticsearch/action/knapsack/imp/KnapsackImportRequest.java for methods setIndex() and setType() to address the new index.

With addIndexSettings() and addIndexTypeMapping (), you can define index settings and type mappings for the knapsack import.