Also for bulk editing docs check out (doesn't do them in batch though) http://github.com/maxogden/removalist
On Wed, Jul 6, 2011 at 4:45 PM, Randall Leeds <[email protected]>wrote: > On Wed, Jul 6, 2011 at 16:41, Matthias Eck <[email protected]> > wrote: > > Hello, > > > > I need to add a new field to all documents in my database. > > > > To have a better control I wanted to do this by batches and defined 2 > views: > > documents_without_newfield > > documents_with_newfield > > > > My idea was to just take the first 100 returned by the > > documents_without_newfield view, calculate the new field for all of > > them, save them and take the next 100 etc. > > > > As it turns out the views do not seem to be updated immediately, which > > means that the view documents_without_newfield returns about 95 > > documents that actually already had the new field calculated in the > > previous step. > > If you do not include "stale=ok" with your query, you should get > up-to-date views. > Though, perhaps view groups only update to the latest stable commit on > the database. > In that case, you should be able to get what you want by POSTing to > /_ensure_full_commit or setting the X-Couch-Full-Commit: true header > on your request to update the documents. >
