Hello Everybody
I am trying to run multiple queries against a view at the same time using
the queries endpoint.
post to db/_design/designdoc/_view/viewcount/queries
I need different limits and skips on each query.
I post the following data:
{
"queries":[
{
"key":"key1",
"limit":3,
"skip":1
},
{
"key":"key2",
"limit":1,
"skip":2
},
{
"key":"key3",
"limit":4,
"skip":0
},
{
"key":"key4",
"limit":1,
"skip":3
},
{
"key":"key5",
"limit":2,
"skip":1
},
{
"key":"key6",
"limit":3,
"skip":4
}
]
}
My view is as follows:
function(doc){
emit(doc.key, 1);
}
with a _count reduce function.
The response I get is:
status":200,"text":"{\"results\":[\r\n{\"rows\":[\r\n\r\n]},\r\n{\"rows\":[\r\n\r\n]},\r\n{\"rows\":[\r\n\r\n]},\r\n{\"rows\":[\r\n\r\n]},\r\n{\"rows\":[\r\n\r\n]},\r\n{\"rows\":[\r\n\r\n]}\r\n]}\n"}
I have looked at the following documentation, but sorry it's not very clear
to me:
https://docs.couchdb.org/en/stable/api/ddoc/views.html#api-ddoc-view-multiple-queries
Can someone tell me how to formulate this request correctly please?
Thank you
Best regards
Paul