couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Changes API and document revisions
Date Wed, 24 Nov 2010 22:13:33 GMT
The _changes feed only returns the latest version of any document. If
you are following it continuously, you will see each change to a
document, but if you call it again, you'll see gaps.

This is by design. The reason _changes and _all_docs_by_seq work the
same way is because they're reading the same b+tree (_changes is
really the new name for _all_docs_by_seq).

The point of _changes is to allow you to synchronize another resource
to match the source. couchdb replication uses it, and other software
like couchdb-lucene uses it for this purpose. It is *not* an API for
replaying every historical event.

B.

On Wed, Nov 24, 2010 at 9:55 PM, Steve Foulkes <sfoulkes@fnal.gov> wrote:
> I have a service that polls the _changes API and noticed that it will only
> return the latest revision of a document.  For example:
>
> poll _changes last_seq = 1
>
> update doc1 -> rev1, seq = 2
> update doc2 -> rev1, seq = 3
> update doc1 -> rev2, seq = 4
>
> poll _changes, last_seq = 1
>
> The last call to the _changes will return changes for doc1 and doc2 but only
> sequence 4 for doc1.  Is there any way to retrieve all of the documents and
> sequences from _changes?  The _all_docs_by_seq view works the same way.
>
> Steve
>

Mime
View raw message