Skip to content

nikbarseghyan/nia

Repository files navigation

Nia

Nia.js a very simple tool for transfer MongoDB collection into Elasticsearch.

NPM Version MongoDB Elasticsearch

nia

Install

npm install nia.js

Delete Old Elastic data

curl -XDELETE localhost:9200/*

Usage

import { Nia } from 'nia.js';

Nia(opts);
const opts = {
  esOpts: {
    esHost: 'localhost',
    esPort: '9200',
    log: 'error',
    apiVersion: '7.2',
    requestTimeout: 50000,
  },
  esIdx: '{by default collection_name}',
  esType: '{by default collection_name}',
  moColl: '{collection_name}',
  moUrl: `mongodb://localhost:27017/{database_name}`,
  pQueue: 250,
};

About

Transfer MongoDB collection data into Elasticsearch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published