Hi Jens,
thanks for this - makes sense.
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? My feeling from the
docs I have seen is "no".
Also, my view returns a list of key, values. And I can use the eg key
parameter to return a particular key, value. I can also use the keys
parameter to return more than one particular key. But can I return a
document based on more than one field.
What I mean is if a document type is defined as
{
id: xxxx,
fname: fred,
lname: smith,
dob: 01/01/2001
}
The view can emit a key of "doc.fname, doc.lname" but can I search on
"fred" and "smith"? I could combine the two and search on "fredsmith" I
guess. But, moving away from a name, it was two towns, then they could
be any order eg "london-leeds" or "leeds-london". Again, the could be
combined but can a doc be emitted twice eg emit called twice?
Sorry this is all a bit confused, and the examples are not great but
hopefully the general question is getting over.
Regards,
John