elasticsearch-knapsack icon indicating copy to clipboard operation
elasticsearch-knapsack copied to clipboard

Renaming index using java API

Open phani546 opened this issue 9 years ago • 1 comments

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

phani546 avatar May 14 '15 14:05 phani546

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.

jprante avatar May 19 '15 19:05 jprante