laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.54k stars 328 forks source link

Search downtime when running `scout:import` with Algolia #790

Closed caiodounis closed 7 months ago

caiodounis commented 8 months ago

Scout Version

10.3

Scout Driver

Algolia

Laravel Version

10.10

PHP Version

8.2.7

Description

I'm encountering a problem when executing php php artisan scout:import "App\Models\Product": it causes a downtime in my search services due to the clearing of all product records in the Algolia index. Is there a method to reimport these products in a way that overwrites the existing ones, instead of clearing the index?

I attempted to update products individually with a custom command, but this method was too slow and eventually hit Algolia's limits on individual updates.

Steps To Reproduce

Running php artisan scout:import "App\Models\Product"

github-actions[bot] commented 7 months ago

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!

driesvints commented 7 months ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.