couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hong-Thai Nguyen" <>
Subject RE: How to use the changes feed with a view as filter
Date Fri, 12 Aug 2011 10:59:10 GMT
I'm looking for the same solution. The main raison of using view filter in _changes is to
accelerate find out the appropriate modified data (filter in _changes not have index, so too
slow in large-scale scenario).
I suppose that, our database has 1M documents, I've just deleted 1 document, and I'd retrieval
this latest modif  without scan previous 1M docs (I don't know which _lastseq value to pass
through ?since= param).

Do you have any suggestion for this problem ? Jan was totally right, view filter doesn't not
raise up deleted documents, so no sense in this case.

Special thanks


-----Original Message-----
From: Jens Alfke [] 
Sent: lundi 8 août 2011 20:14
Subject: Re: How to use the changes feed with a view as filter

On Aug 8, 2011, at 5:43 AM, Jeroen van Dijk wrote:

This is the original thread that gave me the impression it should be

According to that thread (and the commit message) this is just a shortcut to avoid having
to write a filter function that duplicates an existing map function.

Jan wrote "This so you can get a notification for when a view *would* be updated if you queried
it.", but I don't see how that follows. Sure, it will tell you when a new revision of a document
will appear in the view, but it won't tell you when a document that used to be in the view
isn't any more (because the filter function no longer emitted any rows for it). Being notified
of only insertions and updates but not deletions doesn't seem useful in practice.


View raw message