finding a doc based on 2 values
i am trying to store some chat history in the couch db for future retrieval by user.
the doc has a the following fields.
doc_owner and chat_partner
this doc is unique so there can be only one doc for the doc_owner and chat_partner pair
how can i retrieve the doc based on these 2 values since i dont know the key which is a
auto increment int. in a view i can create a view based on doc_owner but how can i get the
one which has a certain chat_partner without having to get all and loop thru the return
of view and look at value ?
in SQL it would be a simple where doc_owner =x and chat_partner = z