You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, typesence-driver makes two http requests on any model update, even if the changed field is not in the document schema. This causes performance problems if there are a lot of updates.
Real life example: I have a collection with over 10000 documents in it. Each document is updated hourly. Each update changes one model attribute, which triggers 2 request to typesense server. That's 5.5 completely unnecessary requests per second.
MyModel::first()->update([
'some_field' => 'test',
]);
// scout sends GET to /collections/my-model// scout sends POST to /collections/my-model/documents/importMyModel::first()->update([
'some_date' => now(),
]);
// scout sends GET to /collections/my-model// scout sends POST to /collections/my-model/documents/import
The text was updated successfully, but these errors were encountered:
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Scout Version
10.8.5
Scout Driver
Typesense
Laravel Version
10
PHP Version
8.3.3
Database Driver & Version
No response
SDK Version
No response
Meilisearch CLI Version
No response
Description
At the moment, typesence-driver makes two http requests on any model update, even if the changed field is not in the document schema. This causes performance problems if there are a lot of updates.
Real life example: I have a collection with over 10000 documents in it. Each document is updated hourly. Each update changes one model attribute, which triggers 2 request to typesense server. That's 5.5 completely unnecessary requests per second.
This issue has been fixed in Typesense official driver (typesense/laravel-scout-typesense-driver#23), but not in Laravel official driver.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: