New to couchdb. I have a couchdb database, and then I have added users document to this database. I want to maintain uniqueness of both username AND email. If I had to check uniqueness of only one of those two fields I could use it directly as the _id value. But username or email address cannot have duplicate entries. How do I go about solving this?
Also, how does uniqueness work in a cluster scenario?