You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by ermouth <er...@gmail.com> on 2023/03/08 17:53:45 UTC
Joins with views, by keys
Hi,
since very early versions CouchDB view functions are able to
emit(key,{_id:other_doc_id}), which, being requested with
?include_docs=true, resolves into external doc. CouchDB docs titled the
feature "Joins with views",
https://docs.couchdb.org/en/stable/ddocs/views/joins.html.
Also since 2.2 Couch can process multiple view index queries in a single
request.
I wonder if CouchDB could somewhat cross-wire both mechanics. Like
replacing .value for emit(key,{_rows:[other_view_keys]}) entries when say
?expand_rows=true requested.
Or keeping .value intact, but add .rows:[other_rows] property. Or even make
it recursive N level deep with expand_rows=N, with N=1 for true.
Any thoughts?
ermouth