Hello

I'm looking to execute a view multiple times at once for different keys
with different limits and skips (associated to each query). So I need the
following:

POST /recipes/_design/recipes/_view/by_title/queries
HTTP/1.1Content-Type: application/jsonAccept: application/jsonHost:
localhost:5984
{    "queries": [        {            "keys": [
"meatballs",                "spaghetti"            ]        },
{            "limit": 3,            "skip": 2        }    ]}

And I get the results object for each query. But can someone tell me
how I form the queries object for multiple queries please? Something
like:

{    "queries": [

        {            "keys": [                "meatballs",
   "spaghetti"            ]        },        {            "limit": 3,
          "skip": 2        },

        {            "keys": [                "meatballs3",
    "spaghetti3"            ]        },        {            "limit":
4,            "skip": 5        }

] }

 or should this be done a different way? I'm only doing one key per
view. So it's a way to execute a query multiple times in bulk with
different limits and skips and get the array of results for each key.
I'm looking to do the following:

1) Get the count of each key and use this to get a random item within
the duplicates of the key.

2) Delete a random item with the duplicates of the key.

I see it as a way to prevent concurrence when deleting items with
multiple concurrent jobs.

I hope that's clear.

Thanks a lot

Best regards

Paul

Reply via email to