This is my problem.
I’m having an issue querying a view that has a compound key (of 2 items).
this is the function:
function(doc, meta)
{
emit([doc.et.substring(0, 10),doc.progname],doc.cput);
}
these are the data:
“2020-04-04”, “PGM1”
“2020-04-04”, “PGM2”
“2020-04-04”, “PGM3”
“2020-04-04”, “PGM4”
“2020-04-04”, “PGM5”
“2020-10-04”, “PGM1”
what I want to extract is:
“2020-04-04”, “PGM1”
“2020-04-04”, “PGM5”
the only method I’ve found is setting the keys [[“2020-04-04”, “PGM1”], [“2020-04-04”, “PGM5”]]in the results filter, but I need a dynamic solution
because next time I might want to extract:
“2020-04-04”, “PGM1”
“2020-04-04”, “PGM2”
“2020-04-04”, “PGM5”
“2020-10-04”, “PGM1”
and using startkey and endkey the problem is not solved because the PGM3 and PGM4 data are also included.
does anyone know how to help me?