couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Black <>
Subject Re: couchdb data structure
Date Fri, 22 Nov 2013 18:32:03 GMT

On 11/22/2013 10:58 AM, Jens Alfke wrote:
> On Nov 22, 2013, at 6:18 AM, John Norris <> wrote:
>> To continue on this path, so if I have separate document types, where docTypeA has
a reference to docTypeB, can I have a view that returns a docTypeA based on a value within
docTypeB object?
> I think you can do this using the linked-documents feature of the indexer. If your map
function emits a value that’s an object containing a “_id” property, then the view will
treat that index entry as though it were generated by the document with that ID, so if you
query with include_docs the contents of the linked document will be returned.
Here's another way, too:


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