couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject Re: Migrating documents
Date Mon, 22 Dec 2008 04:38:03 GMT
On Sun, Dec 21, 2008 at 8:33 PM, Paul Gross <> wrote:
> What is the best way to migrate all of the existing documents?  Is there a
> way to do it server side, or do I have to read all of my documents and bulk
> update them?

Iterating over the documents like that is probably the easiest way.
You can use _all_docs with ?include_docs=true for reading, and
_bulk_docs for updating. You could also use a view that pulls out only
the un-migrated  documents, and query it to make sure you got all of
them (in case of old inserts during the upgrade, or something.)

Chris Anderson

View raw message