couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YIXIAO SHEN <yixiaoshe...@gmail.com>
Subject how to update multiple fields in a doc
Date Wed, 09 Nov 2011 16:30:05 GMT
Hi all,

I'm running a test on CouchDB, this test generates documents in CouchDB
database and later randomly updates the documents. The parameter for the
update is: id of the doc and map<key, value> that indicates the fields of
the doc to update. It doesn't have any knowledge of the doc version and I
retrieved this information from CouchDB before updating. This is slow and
in multi-thread environment this approach causes a lot of update conflicts.

I have been reading about the update handler and it seems to me that this
could be a possible way to go. But I'm having difficulty to implement this
update function, can anyone give me an example of how to write such a
function that can update multiple fields in a document, the fields to be
updated is not predefined but randomly specified by the test application.

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message