mongoose-es-index-update

1.0.7 • Public • Published

mongoose-es-index-update Build Status npm version

update elastic search index after save , updateOne mongoose hooks

Install

$ npm install mongoose-es-index-update

Usage

 
 
const mongooseEsUpdate = require('mongoose-es-index-update');
 
//..schema ,model
//plugin options required
const options={
   index:"myindex",
    host:"localhost:9200" //elastisearch 
}
someSchema.plugin(mongooseEsUpdate,{otions)
 
mymodel.save() // save your model
 
 

Options

host

Type: string

elasticsearch node host url.

index

Type: string

elasticsearch index

License

MIT © Abdelhak Akermi

Package Sidebar

Install

npm i mongoose-es-index-update

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

9.35 kB

Total Files

11

Last publish

Collaborators

  • abakermi