https://github.com/omardelarosa/mongo-elasticsearch
Easily transfer MongoDB collections into Elasticsearch using Node
https://github.com/omardelarosa/mongo-elasticsearch
Last synced: 8 months ago
JSON representation
Easily transfer MongoDB collections into Elasticsearch using Node
- Host: GitHub
- URL: https://github.com/omardelarosa/mongo-elasticsearch
- Owner: omardelarosa
- Created: 2015-10-25T20:01:19.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-26T02:57:14.000Z (almost 10 years ago)
- Last Synced: 2025-01-29T04:35:56.652Z (8 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Mongo-Elasticsearch
Transfer document collections from MongoDB into Elasticsearch indexes safely and easily.
## Build Status
Branch | Build Status | Version | Code Quality
------- | ------------ | ------- | -----------
master | [](https://travis-ci.org/omardelarosa/mongo-elasticsearch?branch=master) | [](https://img.shields.io/npm/v/mongo-elasticsearch.svg) | [](https://codeclimate.com/github/omardelarosa/mongo-elasticsearch)
development | [](https://travis-ci.org/omardelarosa/mongo-elasticsearch?branch=development) | 1.0.1## Install
```bash
npm install mongo-elasticsearch
```## Usage
```javascript
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:def456@myhost.com:27747/dbname',
mongoSourceCollection: 'tweets'
});t.start().then(function(results) {
console.log('Exiting');
console.log(results);
process.exit();
});
```