Thanks very much - much better! On Tue, Jan 27, 2009 at 1:44 PM, Chris Anderson <[email protected]> wrote:
> On Tue, Jan 27, 2009 at 10:39 AM, Adam Petty <[email protected]> wrote: > > Hello, > > > > Is it possible to set the compaction to leave *n* doc revs? I've looked > > around breifly - but wasn't sure. We'd like to use the doc revs for > "undo" > > or "history" features but still be able to compact the db file. > > > > doc rev is used for optimistic concurrency. if you are interested in a > versioning system you'll need to provide it at the application layer. > The simplest way to do this is to store subsequent versions of > application documents as new couch docs, and include the id of the > original couch document, as well as a timestamp, in each updated > version. Then you can do a view by > > emit([doc.original_id || doc._id, doc.timestamp], null) > > to get a list of all versions of a document in order. > > > -- > Chris Anderson > http://jchris.mfdz.com >
