Closed ingria closed 5 months ago
Hey @ingria,
I'll make sure to submit a PR to fix this in the scout official driver.
CC : @jasonbosco
Thank you for reporting this issue!
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.
Thank you!
Fixed with #820, should be closed.
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 (https://github.com/typesense/laravel-scout-typesense-driver/issues/23), but not in Laravel official driver.
Steps To Reproduce
1) Create a model with two attributes:
2) Update any non-existent attribute: