incubator-couchdb-user mailing list archives

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

On 11/22/2013 10:58 AM, Jens Alfke wrote:
> On Nov 22, 2013, at 6:18 AM, John Norris <john@norricorp.f9.co.uk> 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.
> 	http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views#Linked_documents
Here's another way, too: 
http://mail-archives.apache.org/mod_mbox/incubator-couchdb-user/201311.mbox/%3C528592D1.2040107@alwaysreformed.com%3E

Tim


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