I'm new to CouchDB and I have documents like this:
{
"credit_type" : "ADJ",
"particular" : "Adjusted hours on 2018-01-01"
}
Then I have a view with this Map function
function(doc) {
if(doc.credit_type == "ADJ") { emit(doc.particular, doc); }
}
My view url is like this:
http://mywebsite.com:5984/_utils/database.html?client_docs/_design/adj/_view/adj
What I want to do is be able to query documents that will match my search key. The lookup field is the particular
field.
The search key is a date like 2018-01-01
When I put they search url like
http://black-widow.remotestaff.com:5984/client_docs/_design/adj/_view/adj?key=20180-01-01
I should be able to fetch records which contains 2018-01-01
string in the particular
field
I don't have any reduce function yet