koti42 Hatayı arattığımda https://github.com/babenkoivan/scout-elasticsearch-driver paketine ulaştım. Paketin dokümanlarını okuduğumda ise şöyle bir ifade gördüm: "Note, that every searchable model requires its own index configurator." Hemen altında da örnek vermiş:
php artisan make:searchable-model MyModel --index-configurator=MyIndexConfigurator
<?php
namespace App;
use ScoutElastic\Searchable;
use Illuminate\Database\Eloquent\Model;
class MyModel extends Model
{
use Searchable;
protected $indexConfigurator = MyIndexConfigurator::class;
protected $searchRules = [
//
];
// Here you can specify a mapping for model fields
protected $mapping = [
'properties' => [
'title' => [
'type' => 'text',
// Also you can configure multi-fields, more details you can find here
// https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html
'fields' => [
'raw' => [
'type' => 'keyword',
]
]
],
]
];
}