Trying to retrieve changes in pouchDB for particular view, but still receiving allDocs ... what am I doing wrong? Havent found any tutorials or detailed info how to do this, except pouch API doc (http://pouchdb.com/api.html#changes). I've tested view and filter options with no luck.
This view is designed and saved as /notes
function(doc) {
if (doc.model == 'note') {
emit(doc._id, doc);
}
}
live changes feed:
pouch.changes({
live: true,
view: '_view/notes'
})
.on('change', function handleUpdate(change) {
// log changed document
pouch.get(change.id).then(function(row) {
console.log(row);
}
})
Maybe the view path is wrong...? Thanks for any help.