incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Landolt" <d...@deanlandolt.com>
Subject Re: Optionally including docs in view results
Date Mon, 04 Aug 2008 21:42:04 GMT
On Mon, Aug 4, 2008 at 5:34 PM, Tom Wright <tom@inflatablecookie.com> wrote:

> I have a suspicion there was a discussion on the list a little while back
> about being able to perform this operation via _bulk_docs, although I don't
> know where off the top of my head, and I have no idea whether that was
> veto'd or not as I think there were a few issues with making it play nice
> with the current functionality.
>
> If _bulk_docs can be made to work with fetching records as well as updating
> them, I think that may be the neater way to go. On the other hand, if it
> can't, then the patch you've posted looks good enough to me, although I'm
> hardly an authority :)


After a little googlin' through my gmail I came up with Paul Davis post from
a few weeks ago:

There was an idea floated on another thread to make _bulk_docs support
a post body of something like:

{
"put": [ { "_id": "doc1", "foo": "bar" } ],
"post": [ { "baz": "foo" } ],
"delete": [ {"_id": "doc2" } ],
"get": [ { "_id": "doc3" }, { "_id": "doc4"} ]
}

I looked briefly into this, but the code that runs bulk docs is a lot
deeper than I thought it was. There's quite a bit of stuff related to
replication and consistency.

There was also a suggestion in that thread to use a GET to _bulk_docs to
signify multi-key loads but was nixed because of potential url length
limitations. So it looks like unless someone can untangle the _bulk_docs
code (I'm still in the very early stages of learning Erlang and it's slow
going for now, so it certainly won't be me), it looks like a separate
_load_docs endpoint is the way to go.

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