From 874a173d28ca844c36f54ae241f7f481db5a8f18 Mon Sep 17 00:00:00 2001 From: Samuel Levy Date: Sat, 23 Sep 2023 01:12:35 +1000 Subject: [PATCH] Allow configuration of Algolia batch size (#768) --- src/EngineManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/EngineManager.php b/src/EngineManager.php index 1807783f..e4b538a3 100644 --- a/src/EngineManager.php +++ b/src/EngineManager.php @@ -58,6 +58,10 @@ public function createAlgoliaDriver() $config->setWriteTimeout($writeTimeout); } + if (is_int($batchSize = config('scout.algolia.batch_size'))) { + $config->setBatchSize($batchSize); + } + return new AlgoliaEngine(Algolia::createWithConfig($config), config('scout.soft_delete')); }