From a2640fda064e7e21078397fb6c1c04c6bf539c15 Mon Sep 17 00:00:00 2001 From: Jamy L Date: Sun, 26 Jun 2022 23:27:23 +0200 Subject: [PATCH] target indexAdapter for the scout:flush command php artisan scout:flush command raise an error : "Call to undefined method JeroenG\Explorer\Infrastructure\Elastic\ElasticDocumentAdapter::flush()" We need to call indexAdapter instead of documentAdapter inElasticEngine Class --- src/Infrastructure/Scout/ElasticEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infrastructure/Scout/ElasticEngine.php b/src/Infrastructure/Scout/ElasticEngine.php index ae635d2..993fa4a 100644 --- a/src/Infrastructure/Scout/ElasticEngine.php +++ b/src/Infrastructure/Scout/ElasticEngine.php @@ -196,7 +196,7 @@ public function getTotalCount($results): int */ public function flush($model): void { - $this->documentAdapter->flush($model->searchableAs()); + $this->indexAdapter->flush($model->searchableAs()); } public static function debug(): Debugger