reindexer

0.1.0 • Public • Published

Reindexer tool

Reindex Elastic Search models.

Usage

Create a js file with following content

#!/usr/bin/env node
 
const Reindexer = require('@carecloud/es-reindexer');
// require the model/schema you would like to reindex.
const schema = require('./bin/reindexer/schema');
 
const reindexer = new Reindexer();
 
reindexer.reindex(
  process.env.ES_HOST,  // Elastic Search host, make sure you have it defined in your .env
  process.env.ES_PREFIX, // Elastic Search Prefix, should be defined in .env as well
  process.env.ES_USER,
  process.env.ES_PASS, 
  schema,
  false, // replace current index, true: apply the changes, false: dry run 
  null // path to mapping file
);
 

Then just run the file on your terminal.

Readme

Keywords

none

Package Sidebar

Install

npm i reindexer

Weekly Downloads

2

Version

0.1.0

License

ISC

Unpacked Size

11.4 kB

Total Files

5

Last publish

Collaborators

  • marcosjun