Python Elasticsearch to CSV Exporter Sample Script
provided by Jeff Steinmetz, @jeffsteinmetz
This script is meant to provide a starting point for your specific Elasticsearch export.
You will need to update the script with your server address, query string and key names for returned fields.
It also demonstrates how to obtain a random sampling of data, useful for creating machine learning training sets, cross validation sets and test sets.
Requires Python and
the Elasticsearch Python client, found here:
http://www.elasticsearch.org/blog/unleash-the-clients-ruby-python-php-perl/#python