level-stream-to-elasticsearch

1.0.0 • Public • Published

Migrate data from LevelDB to Elasticsearch the stream way io.js supported Build Status npm version

A writable stream wrapped elasticsearch index operation to bulk

Install

npm install level-stream-to-elasticsearch

Usage

// Create transform stream
var transformer = new Level2ESIndexTransformStream(opts);
 
transformer.on('end', function(){
  console.log('finish');
});
 
// Prepare a ElasticsearchStreamIndex
var esi = new ElasticsearchStreamIndex(es, { highWaterMark: 2 });
 
esi.on('finish', function(){
  console.log('esi finished');
});
 
// Pipe
levelDB.createReadStream().pipe(transformer).pipe(esi);

Package Sidebar

Install

npm i level-stream-to-elasticsearch

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • fanweixiao