Category : laravel-scout

Since Laravel Scout doesn’t support more complex where clauses than simple numeric comparisons. I checked the source code and I found the following lines if (!empty($models = $model->getScoutModelsByIds($builder, $modelKeys))) { $instances = $instances->merge($models->load($searchable->getRelations($modelClass))); } The instances is what is returned from Algolia search, so for example the following search essentially returns the $instances variable. Mode::search(‘something’)->get(); ..

Read more

I am using laravel elastic search package. In Scout.php file. I am giving index laravel which is working with one model staff but not working with other models. scout.php ‘elasticsearch’ => [ ‘index’ => env(‘ELASTICSEARCH_INDEX’, ‘laravel’), ‘config’ => [ ‘hosts’ => [ env(‘ELASTICSEARCH_HOST’, ‘http://localhost’), ], ], In models i am using public function searchableAs() { ..

Read more