slingshot0.0.2 • Public • Published
Slingshot provides a really simple set of command line tools for managing ElasticSearch data and mappings. It uses the ElasticSearch scan query and the bulk index API to make data import/export really fast.
Install slingshot globally so it's available on your system path with the following command, it requires node and NPM to be installed.
sudo npm install -g slingshot
Most commands accept and return data via UNIX pipes, making them highly composable and flexible to your workflow.
slingshot export -i twitter -t tweet > tweets.json - Stream all items in a given index and type to a JSON file.
slingshot import -i twitter -t tweet < tweets.json - Stream all items back into a given index and type from a JSON file.
These two commands allow you to quickly iterate when developing and testing mappings without incurring the massive overhead of re-crawling every time.
npm i slingshot