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}".

Regards,
-Matthew.

---
Matthew R Hanlon



Reply via email to