Update by query is asking for an id
Description
I am trying to implement an update-by-query operation similar to the official docs. But I get an error saying:
For update, the id key must be provided.
Steps to reproduce
Code is almost identical to the official docs sample:
$document = ['field' => 'new_value'];
$filter = ['field:=' . $oldValue];
$this->typesenseClient->collections[$collection]->documents
->update($document, ['filter_by' => $filter]);
Expected Behavior
A successful API result and the target field is updated to 'new_value'
Actual Behavior
Exception thrown: Typesense\Exceptions\RequestMalformed For update, the id key must be provided.
Metadata
Typesense Version: Using typesense cloud API version 0.25.1
Typesense Client Version: 4.8.7
Thank you for catching that.
@karakhanyans @arayiksmbatyan We need to add support for update by query, just like how we handle this in the typesense-js library: https://github.com/typesense/typesense-js/commit/1d34b880d47931d10bd974b41be49a6cf2918e95#diff-1e0565f0f17e3dfb64595df01f7506e4c30037e834ac03d758198f25e05c397eR228-R251
Facing the same issue and shocked that this isn't already fixed, I provided a PR (#61)