couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <>
Subject Re: want to get json result from more than one document
Date Fri, 05 Nov 2010 09:45:44 GMT
	You could use the new-ish (added in 0.11) view joins, described  
nicely in

A view like:

function(doc) {
   if (doc.type == "blog"){
     emit(doc._id, {post: doc.body,});

is probably want you want, queried by


On 5 Nov 2010, at 09:22, tu wrote:

> I want to implement a blog server. I design two type of documents:  
> "Author"
> and "Blog". A "Blog" document contains a field "author_uid" to refer a
> "Author" document.
> I use CouchApp framework to show list of  recent posts. I find I  
> have to
> invoke couchdb server many times to show both blog body and author  
> details
> in each item.
> Is their and solution to return a complete json result contains full
> "Author" json object in "Blog" json object on server side?

View raw message