npm.io
1.0.1 • Published 11 years ago

es-index

Licence
MIT
Version
1.0.1
Deps
1
Vulns
0
Weekly
0

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

Keywords