incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: Questions about changes feed
Date Mon, 25 Oct 2010 14:57:12 GMT
On Oct 24, 2010, at 10:10 PM, kowsik wrote:

> I have a few questions about the _changes feed.
> 
> 1. How many changes are kept around for each DB? Obviously, not
> everything, but is it the last 100, 1000 or some other configurable
> limit?

The most recent edit of each branch of every document is kept around forever, or until a new
edit on that branch occurs.

> 2. When I'm using a filter in a _design document, is the most recent
> version of the _design document used for the filtering or does it
> depend on the update seq? Let me elaborate:
> 
>    seq #1 (added _design doc with filter v1)
>    seq #2 (doc A changed)
>    seq #3 (updated _design doc to v2)
>    seq #4 (doc B changed)
> 
> In the above case, when I invoke the _changes API, does it always use
> the v2 filter for all changes or uses v1 for seq #2 and v2 for seq #4?

If you submit the _changes request after #3 has been saved you'll use v2 of the filter for
all changes.  I believe if you submit the request before #3 is saved your entire request will
be filtered using v1.

> 3. If there were a 1000 changes and I invoke _changes without 'since',
> does all filter get invoked with all of the pending changes?

The filter that you specify will be invoked on all 1000 changes, yes.  Best,

Adam

Mime
View raw message