1.0.7 • Published 4 years ago

mongoose-es-index-update v1.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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