Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including slingshot with all npm packages installed. Try it out:

var slingshot = require("slingshot")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

slingshot v0.0.2

Simple set of command line tools for managing ElasticSearch data and mappings.

###Slingshot

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.

##Installation

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

##Usage

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.

#License

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free