You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Fabio Di Bernardini <fd...@altraqua.com> on 2011/09/08 16:21:32 UTC

Bulk update best practices

Hi,

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?

Thanks.

Re: Bulk update best practices

Posted by Randall Leeds <ra...@gmail.com>.
There is no way to bulk update documents on the server.
You can fetch all the documents you want to edit with _all_docs and update
them with _bulk_docs, but that is the best you get.
See here: https://wiki.apache.org/couchdb/HTTP_Bulk_Document_API

On Thu, Sep 8, 2011 at 07:21, Fabio Di Bernardini <fd...@altraqua.com> wrote:

> Hi,
>
> 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?
>
> Thanks.
>