From d1022cc3fda9715124756f3f9e494e73056d7b7d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 12 May 2025 20:27:20 +1000 Subject: [PATCH] fixes for nullengine in elastic --- app/Models/BaseModel.php | 5 ----- config/elastic.client.php | 6 +++--- config/elastic.scout_driver.php | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index a40131cb28..26aa13ecac 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -103,11 +103,6 @@ class BaseModel extends Model return $this->encodePrimaryKey($this->id); } - public function shouldBeSearchable() - { - return config('scout.driver') === 'elastic'; - } - public function dateMutator($value) { return (new Carbon($value))->format('Y-m-d'); diff --git a/config/elastic.client.php b/config/elastic.client.php index 77b5b0e306..7f6679fda9 100644 --- a/config/elastic.client.php +++ b/config/elastic.client.php @@ -5,12 +5,12 @@ return [ 'connections' => [ 'default' => [ 'hosts' => [ - env('ELASTIC_HOST'), + env('ELASTIC_HOST', 'https://localhost:9200'), ], // configure basic authentication 'basicAuthentication' => [ - env('ELASTIC_USERNAME'), - env('ELASTIC_PASSWORD'), + env('ELASTIC_USERNAME', 'elastic'), + env('ELASTIC_PASSWORD', 'changeme'), ], // configure HTTP client (Guzzle by default) 'httpClientOptions' => [ diff --git a/config/elastic.scout_driver.php b/config/elastic.scout_driver.php index 4290093d0e..a5d123aa8d 100644 --- a/config/elastic.scout_driver.php +++ b/config/elastic.scout_driver.php @@ -1,5 +1,5 @@ env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', true), + 'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false), ];