I have 2 types of documents in my couchbase lite .
doc 1 = site doc , having a doc type of site ( It has other fields like Label , number etc)
doc 2 = Panel doc , having a doc type as panel ( It has other fields like Label , number etc)
Each sit has multiple panels associated to it .
The doc 2 has the field which links to the id of the site doc .
Now i want to emit the site Label and also want to emit the label of the panel to the site. I need to emit 2 times .
As of now i have written a emit function which gets all the panels related to a site with number 2 as below
view.SetMap((doc, emit) =>
if (((string)doc[“DocType”] == “Panel”)&& ((string)doc["Site Number "] == “2”))
Now in the same map function i want to emit the site label of the site number 2 which is a seperate doc . How to do it ?
if emmited how will i query and get both the data . ( Code in C#)