mongo-elasticsearch
v1.0.0
Published
import documents from mongodb to elasticsearch
Downloads
6
Maintainers
Readme
Mongo-Elasticsearch
Transfer document collections from MongoDB into Elasticsearch indexes safely and easily.
Build Status
Branch | Build Status | Version | Code Quality ------- | ------------ | ------- | ----------- master | | | development | | 1.0.1
Install
npm install mongo-elasticsearch
Usage
var mongo-elasticsearch = require('mongo-elasticsearch');
var t = new mongo-elasticsearch.Transfer({
esOpts: {
host: 'localhost:9200',
log: 'trace'
},
esTargetType: 'tweet',
esTargetIndex: 'twitter',
mongoUri: 'mongodb://abc123:[email protected]:27747/dbname',
mongoSourceCollection: 'tweets'
});
t.start().then(function(results) {
console.log('Exiting');
console.log(results);
process.exit();
});