I am having couchbase documents stored in below format:
{
"userEmail": "satyam@xyz.com",
"hashedPassword": "$2a$12$MT31FHNEbOAKpQGzLdBB3uhLlPlGNU0cvsgi/2pt4TdwPjvrUzkSG",
"type": "user",
}
I want to read only the document which is having userEmail value as satyam@xyz.com. For this I wrote a couchbase view:
function (doc, meta) {
if(doc.userEmail == "satyam@xyz.com")
emit(doc.data, meta.id);
}
Now what I want is, I want to pass value "satyam@xyz.com" from the Java code. I tried it a lot but couldn't find a proper solution. Can anybody help me out from this dilemma.
Thanks in advance for any kind of suggestions.