couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Fadda <>
Subject Re: CouchDB Next
Date Sun, 02 Oct 2016 12:29:30 GMT
Well, that's not what I meant. What I want is a query parameter to get only the specified document’s
fields on a simple GET /{db}/{docid}. CouchDB should parse the JSON and returns only the required
fields, because in a real scenario there are times you don’t need the entire document, but
just some fields. Lazy Loading is a well known pattern and it’s really effective.

> On 30 Sep 2016, at 20:23, Nick Vatamaniuc <> wrote:
> Hi Filippo,
>> Lazy Loading
>> ——————
>> I don’t know if CouchDB 2.0 comes with such a feature, but I would like to have
a mechanism to get just some document’s fields. Sometime I just need the title or whatever,
but I have to get the entire document. I would like to request just a set of fields when I
retrieve a document from the database.
> There is  pr to do something like this with _change feeds and mango
> selectors. It adds an additional fields parameters to return only some
> fields from the doc. So if the doc is 10MB and you just want to return
> 1 field:
> Cheers,
> -Nick

View raw message