I am having couchbase documents stored in below format:
{
"userEmail": "[email protected]",
"hashedPassword": "$2a$12$MT31FHNEbOAKpQGzLdBB3uhLlPlGNU0cvsgi/2pt4TdwPjvrUzkSG",
"type": "user",
}
I want to read only the document which is having userEmail value as [email protected]. For this I wrote a couchbase view:
function (doc, meta) {
if(doc.userEmail == "[email protected]")
emit(doc.data, meta.id);
}
Now what I want is, I want to pass value "[email protected]" 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.