Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abakermi/mongoose-es-index-update
update elastic search index within mongoose hooks
https://github.com/abakermi/mongoose-es-index-update
Last synced: about 1 month ago
JSON representation
update elastic search index within mongoose hooks
- Host: GitHub
- URL: https://github.com/abakermi/mongoose-es-index-update
- Owner: abakermi
- License: mit
- Created: 2020-02-16T09:22:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-08T13:48:23.000Z (almost 5 years ago)
- Last Synced: 2024-11-12T08:53:18.406Z (about 1 month ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# mongoose-es-index-update [![Build Status](https://travis-ci.com/abakermi/mongoose-es-index-update.svg?branch=master)](https://travis-ci.com/abakermi/mongoose-es-index-update) [![npm version](https://badge.fury.io/js/mongoose-es-index-update.svg)](https://badge.fury.io/js/mongoose-es-index-update)
> update elastic search index after save , updateOne mongoose hooks
## Install
```
$ npm install mongoose-es-index-update
```## Usage
```js
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](https://github.com/abakermi)