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

what's the initiator of this job? coz i can't figure out what the
solution might really be here.

On Sat, Oct 1, 2022 at 1:30 AM Rene Veerman <
rene.veerman.netherla...@gmail.com> wrote:

> alternately, you could use your own current db-access business logic
> routines, and request each view result through javascript, then combine the
> data in javascript.
>
> On Sat, Oct 1, 2022 at 1:28 AM Rene Veerman <
> rene.veerman.netherla...@gmail.com> wrote:
>
>>
>> https://github.com/NicerEnterprises/nicerapp/blob/main/NicerAppWebOS/apps/NicerAppWebOS/applications/2D/news/class.newsApp-3.php#L498
>> has an example of multi-threaded curl in PHP, in this case to request
>> 400+ RSS servers for their latest results, but you could easily run a
>> couple of view queries with this as well.
>>
>> On Sat, Oct 1, 2022 at 1:26 AM Rene Veerman <
>> rene.veerman.netherla...@gmail.com> wrote:
>>
>>> multi-threaded curl would seem the answer to this.
>>> the view definition itself would enable a binary tree for the searches
>>> to happen quickly, wouldn't it? <asking everyone here>
>>>
>>> On Sat, Sep 3, 2022 at 11:29 AM Paul Milner <pauljmil...@gmail.com>
>>> wrote:
>>>
>>>> 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