https://github.com/lubyruffy/es-reindex
https://github.com/lubyruffy/es-reindex
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lubyruffy/es-reindex
- Owner: LubyRuffy
- License: mit
- Created: 2015-08-02T16:45:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-06T07:01:55.000Z (almost 10 years ago)
- Last Synced: 2025-01-28T05:44:09.803Z (4 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# es-reindex - simple ruby script for copying ElasticSearch index
Simple ruby script to copy and reindex ElasticSearch index,
copying index settings and mapping(s).Progress and time estimation is displayed during the scrolling process.
## Requirements
Ruby 1.8.6 or newer is required, use [rvm](https://rvm.io/) for convenience.
Following gems are required via `Gemfile`:
+ [rest-client] (https://github.com/archiloque/rest-client)
+ [oj] (https://github.com/ohler55/oj)You can install the requirements locally via `bundler`:
$ bundle install --path=.bundle
## Usage
Refer to script's help:
$ ./es-reindex.rb -h
Script to copy particular ES index including its (re)creation w/options set
and mapping copied.
Usage:
./es-reindex.rb [-r] [-f ] [source_url/] [destination_url/]
- -r - remove the index in the new location first
- -f - specify frame size to be obtained with one fetch during scrolling
- -u - update existing documents (default: only create non-existing)
- optional source/destination urls default to http://127.0.0.1:9200## Changelog
+ __0.0.8__: Optimization in string concat (@nara)
+ __0.0.7__: Document header arguments `_timestamp` and `_ttl` are copied as well
+ __0.0.6__: Document headers in bulks are now assembled and properly JSON dumped
+ __0.0.5__: Merge fix for trailing slash in urls (@ichinco), formatting cleanup
+ __0.0.4__: Force create only, update is optional (@pgaertig)
+ __0.0.3__: Yajl -> Oj
+ __0.0.2__: repated document count comparison
+ __0.0.1__: first revision## License
es-reindex is copyright (c)2012 Jiri Nemecek, and released under the terms
of the MIT license. See the LICENSE file for the gory details.