I'm using couch db to store subscription documents. While performing queries, I want to be able to query on multiple properties and also use an "IN" clause. For example, I have a subscriptionStatus
property which can have multiple values (Active, Failed, In_Progress etc.) and subscriptions also have a customerID
.
How can I create a query for all subscriptions where customerID = "JD212S" AND subscriptionStatus IN ["Active", "In_Progress"]
Essentially show me active and in progress subscriptions for a particular customer. I looked at combinations of views, multiple keys etc but I was not able to do this (or I've misunderstood the docs).
I've had a look at a number of Stack Overflow Q/A and CouchDB docs for this but seem to find options only for a single property at a time.