fdb
fdb

Reputation: 2038

CouchDB: bulk update best practices

My use case: i would set a flag ("read" or "unread") in a group of documents with only one request. My first idea was to send a list of ids using an _update handler but reading docs it seem to work only on one document. I'm wrong? How to solve this case?

Upvotes: 3

Views: 2159

Answers (1)

JasonSmith
JasonSmith

Reputation: 73752

You are correct.

Currently (CouchDB 1.1.0 and to my knowledge the next release, 1.2 also), the only way to modify documents in bulk is to send the literal documents themselves to CouchDB using the CouchDB bulk document API.

In my experience, in practice, this is not a major problem because bulk operations tend to be done with offline tools or else with AJAX operations where there is no noticeable impact to the user experience.

Upvotes: 4

Related Questions