Skip to content

Commit

Permalink
Add update method that changes document but not search index
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Smith-Unna committed Jun 30, 2017
1 parent dcd4778 commit 62a7cd8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ Yuno.prototype.add = function (cb) {
return multi.obj([store, index])
}

Yuno.prototype.update = function (cb) {
var storeify = through.obj(function (data, enc, next) {
var putOp = self.putOp(data)
next(null, putOp)
})

var store = pumpify.obj(
storeify,
levelstream(self.docstore)({ sync: true })
)

eos(store, cb || noop)

return store
}

Yuno.prototype.get = function (key, cb) {
this.docstore.get(key, cb)
}
Expand Down

0 comments on commit 62a7cd8

Please sign in to comment.