couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Supporting "?attachments=true" for views
Date Mon, 15 Nov 2010 20:02:41 GMT
Hi Igor,

On 15 Nov 2010, at 19:07, Igor Kolomiets wrote:

> Someone already asked about this feature recently, but that remained unanswered.
> I'm looking for support of "attachments=true" feature for view that
> would include the content of document's attachments similar to a
> single-document query operation.
> My application is dealing with documents that store its binary data as
> attachment. Currently my application must issue N+1 queries (one to
> query view and then N queries to get documents' attachments).
> With "attachments=true" that will be just a single view query.
> May be there are fundamental difficulties that prevent implementation
> of this feature?

If attachments are to be returned inside the view result JSON then the
would have to be base64 encoded (on the CouchDB side) and decoded on
the client. This is very inefficient and we're not likely to add that
particular feature.

Making multiple requests is way more efficient there.

I hope that helps :)


View raw message