fixes for nullengine in elastic
This commit is contained in:
parent
0a8ad8efc5
commit
d1022cc3fd
|
|
@ -103,11 +103,6 @@ class BaseModel extends Model
|
||||||
return $this->encodePrimaryKey($this->id);
|
return $this->encodePrimaryKey($this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shouldBeSearchable()
|
|
||||||
{
|
|
||||||
return config('scout.driver') === 'elastic';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function dateMutator($value)
|
public function dateMutator($value)
|
||||||
{
|
{
|
||||||
return (new Carbon($value))->format('Y-m-d');
|
return (new Carbon($value))->format('Y-m-d');
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ return [
|
||||||
'connections' => [
|
'connections' => [
|
||||||
'default' => [
|
'default' => [
|
||||||
'hosts' => [
|
'hosts' => [
|
||||||
env('ELASTIC_HOST'),
|
env('ELASTIC_HOST', 'https://localhost:9200'),
|
||||||
],
|
],
|
||||||
// configure basic authentication
|
// configure basic authentication
|
||||||
'basicAuthentication' => [
|
'basicAuthentication' => [
|
||||||
env('ELASTIC_USERNAME'),
|
env('ELASTIC_USERNAME', 'elastic'),
|
||||||
env('ELASTIC_PASSWORD'),
|
env('ELASTIC_PASSWORD', 'changeme'),
|
||||||
],
|
],
|
||||||
// configure HTTP client (Guzzle by default)
|
// configure HTTP client (Guzzle by default)
|
||||||
'httpClientOptions' => [
|
'httpClientOptions' => [
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', true),
|
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue