Skip to content

NeowayLabs/es-reindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ES-Reindex

If you're using Elastic Search probably you are getting crazy when you need change the mapping of any field, you should reindex all your information over and over again. But how can I do that in production without downtime. We found this good article that suggest how you can reindex and using aliases to zero downtime.

That situation it's very common in our environment, so We decide to implement a Go tool to reindex our indices an update the aliases.

Usage

./es-reindex \
    -from-host=<source-elastic-search> \
    -index=<index-name> \
    -to-host=<destination-elastic-search> \
    -new-mapping=<new-mapping-file>
    -new-index=<new-index-name> \
    -bulk-size=<bulk-size>
  • -from-host: source of data to copy/reindex

  • -to-host: destination of data where copy/reindex

  • -index: name of index to copy/reindex

  • -new-index: name of new index, if not present will be used index-name-UUID (for example: tweets-e0ce1c89579f)

  • -new-mapping: path to mapping of new-index, if not present the original map will be used

  • -bulk-size: number of documents of each request, default is 500

About

Go tool to reindex ElasticSearch indices. You can reindex in different hosts and/or changing the mapping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published