couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: couchdb: suitable for this type of applications ?
Date Sat, 26 Sep 2009 07:22:11 GMT
On Fri, Sep 25, 2009 at 8:34 PM, go canal <> wrote:
>>>When you compact the database it removes all but the most recent version of each
> Does this mean that if I want to support document version feature, I can not compact
the database ?

Applications should not depend on controlling compaction schedules.
Only the most recent version is replicated, so if you run in a cluster
it's like it's compacting all the time.

> Let's say I am working on a Word document, I upload it as an attachment; I need to have
a list of all versions for this file and can download any of previous version.
> Is this how I should model it in CouchDB:
>  - have a version field, not using the CouchDB _rev. update the version in my application.
>  - when uploading the modified Word document, a doc with a different ID is created.
So compacting a DB will not affect them.
>    but how to get a list of all versions of this document ? I need to use another field
to identify them, for example, another application generated ID.
> Is this the general practice ? I am sure supporting versioning is a common request, so
appreciate if you can provide some advices..
> thanks,
> canal

Chris Anderson

View raw message