Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Optional param for chunk size on scout:import #407

Merged

Conversation

serpentblade
Copy link
Contributor

Allow setting an optional chunk size when running a batch import.

This is particularly helpful if you'd like to index a model using a different batch size than the default set for the app. Ideally it may be nice to customize batch sizes per model, instead of a single shared config value to be used across the entire app.

This is a functional workaround as it exposes in the CLI an already available chunk size parameter in the Collection::serializable extension method.

This is very useful for reducing the overhead of queries/update index calls for simpler indexable models. (For example, being able to batch 10k at a time instead of the default 500). Same applies for potentially complex indexable items where you'd want to reduce memory overhead by indexing less than the default at a time.

Allow setting an optional chunk size when running a batch import.
@driesvints driesvints changed the title Optional param for chunk size on scout:import [8.x] Optional param for chunk size on scout:import Jun 22, 2020
@taylorotwell taylorotwell merged commit db1184d into laravel:8.x Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants