# mongo-elasticsearch

> import documents from mongodb to elasticsearch

Latest version **1.0.0** (published 2015-10-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongo-elasticsearch
pnpm add mongo-elasticsearch
yarn add mongo-elasticsearch
bun add mongo-elasticsearch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-10-25 |
| First published | 2015-10-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.40 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | omardelarosa |
| Keywords | mongo, mongodb, elasticsearch, database, importer, transfer, data |

## Links

- npm: https://www.npmjs.com/package/mongo-elasticsearch
- Repository: https://github.com/omardelarosa/mongo-elasticsearch
- Issues: https://github.com/omardelarosa/mongo-elasticsearch/issues
- npm.io page: https://npm.io/package/mongo-elasticsearch

## Dependencies (3)

- [q](https://npm.io/package/q.md) ^1.4.1
- [mongodb](https://npm.io/package/mongodb.md) ~2.0.46
- [elasticsearch](https://npm.io/package/elasticsearch.md) ~8.2.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-25

## README

# Mongo-Elasticsearch

Transfer document collections from MongoDB into Elasticsearch indexes safely and easily.

## Build Status
Branch  | Build Status | Version | Code Quality
------- | ------------ | ------- | -----------
 master | [![build status](https://travis-ci.org/omardelarosa/mongo-elasticsearch.png?branch=master)](https://travis-ci.org/omardelarosa/mongo-elasticsearch?branch=master)  |  [![npm version](https://img.shields.io/npm/v/mongo-elasticsearch.svg)](https://img.shields.io/npm/v/mongo-elasticsearch.svg) | [![code_climate](https://codeclimate.com/github/omardelarosa/mongo-elasticsearch/badges/gpa.svg)](https://codeclimate.com/github/omardelarosa/mongo-elasticsearch)
 development | [![build status](https://travis-ci.org/omardelarosa/mongo-elasticsearch.png?branch=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();
});
```

---
_Source: https://npm.io/package/mongo-elasticsearch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
