spotify/luigi — pull request #364 by miku (2014-06-27 11:28:40+00:00)
Title: Added support for elasticsearch 1.0 or newer.

Provides an `ElasticsearchTarget` and a `CopyToIndex` template task.

Modeled after `luigi.contrib.rdbms.CopyToTable`.

A minimal example (assuming elasticsearch is running on localhost:9200):

class ExampleIndex(CopyToIndex):
index = 'example'

def docs(self):
return [{'_id': 1, 'title': 'An example document.'}]

if __name__ == '__main__':
task = ExampleIndex()
luigi.build([task], local_scheduler=True)

Tests can be run against a local elasticsearch index.