couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Boyce <>
Subject Re: Using _rev in application logic
Date Thu, 01 Apr 2010 13:59:38 GMT
Hi Moritz

I wouldn't use _rev, see Jan's response. I would use update handlers.
See here:

So you could create a revision in the document on update.

title: "I'm a document",
body: "This couchdb stuff is cool."
revisions: [{title: "I'm a document", body:"this couchdb stuff is
update_note: "fixed capitalization of 'this' in body"


On Thu, 2010-04-01 at 14:32 +0200, Moritz Post wrote:
> Hi CouchDB people
> I am currently playing with the couchdb and pretty impressed by several of
> the feature on offer. Great job so far. While reading up on various web
> resources i have come to conclude that it is discouraged to use the _rev
> field for application related logic since the revisions are removed when
> compacting and they are not replicated when using replication.
> Looking at my possible usecase however, i would very much like to use the
> _rev key to track changes in my document. So here are several questions
> regarding that topic:
> 1. Is it generally discouraged to use the _rev in application logic?
> 2. Is compacting something i would like to do for other reasons than to
> remove older revisions (so i could basically not do it)
> 2. Is it possible to somehow also replicate the revision while replicating?
> 3. Is it good practice to use the _rev field in views?
> Any other clarifications in regards to _rev are also welcome.
> Thanks in advance and keep up the good work
> Greets
> Moritz

View raw message