John, On 11/22/2013 10:58 AM, Jens Alfke wrote: > On Nov 22, 2013, at 6:18 AM, John Norris <j...@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.2040...@alwaysreformed.com%3E
Tim