1.0.1 • Published 9 years ago

es-index v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

es-index

A simple approach for indexing data in elasticsearch that's also stored in another db.

Install

npm i --save es-index

Usage

Maybe you've got a model that emits create, update, and delete events.

You could do something like this:

var esindex = require('es-index')

var es = esindex({
  index: 'chat',
  type: 'messages'
})

messages.on('create', function (data) {
  es.create(data)
})

License

MIT