statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

Allow search create/update events to be scheduled in batches #1134

Open SanderFlooris opened 4 months ago

SanderFlooris commented 4 months ago

Currently Statamic listens to the save events on entities, assets etc., and runs the sync instantly.

This works, but is really inefficient if you save a lot of items, as this will cause a lot of requests.

It would be great if Statamic had the option to delay those index update requests, and then send them all as a batch. The updateWithinIndexes function might be a good location to add this feature.

search_update_code