3 function searchPodcast(podcast_id, podcast)
5 emit(podcast_id, null);
7 for(var n in podcast.merged_ids)
9 emit(podcast.merged_ids[n], null);
13 if(doc.doc_type == "Podcast")
15 searchPodcast(doc._id, doc);
17 else if(doc.doc_type == "PodcastGroup")
19 for(var n in doc.podcasts)
21 var podcast = doc.podcasts[n];
22 searchPodcast(podcast.id, podcast);