couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew R Hanlon <>
Subject Regenerate views on (bulk) update
Date Tue, 21 Jun 2011 15:33:21 GMT
Excuse me if I am asking a question that has already been addressed...

When providing a view_updater script to CouchDB, the updater script receives the following
on an update: "{"type":"updated","db":"my_db"}".  So if 100 updates happen, conceivably the
script is called 100 times (I have found that if the updates are very close together, it does
not get called for each update).  But if 100 documents are written to the database using the
_bulk_docs API, then the script is only called a single time.  If the view updater script
received some information about the number of documents that were updated then it could act
appropriately, even for bulk updates.  Something like, "{"type":"updated","db":"my_db","documents":100}".


Matthew R Hanlon

View raw message