PHP Класс ScoutEngines\Elasticsearch\ElasticsearchEngine

Наследование: extends Laravel\Scout\Engines\Engine
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$index string Index where the models will be saved.

Открытые методы

Метод Описание
__construct ( Elasticsearch\Client $elastic, $index ) : void Create a new engine instance.
delete ( Illuminate\Database\Eloquent\Collection $models ) : void Remove the given model from the index.
getTotalCount ( mixed $results ) : integer Get the total count from a raw result returned by the engine.
map ( mixed $results, Model $model ) : Illuminate\Database\Eloquent\Collection Map the given results to instances of the given model.
paginate ( Laravel\Scout\Builder $builder, integer $perPage, integer $page ) : mixed Perform the given search on the engine.
search ( Laravel\Scout\Builder $builder ) : mixed Perform the given search on the engine.
update ( Illuminate\Database\Eloquent\Collection $models ) : void Update the given model in the index.

Защищенные методы

Метод Описание
filters ( Laravel\Scout\Builder $builder ) : array Get the filter array for the query.
performSearch ( Laravel\Scout\Builder $builder, array $options = [] ) : mixed Perform the given search on the engine.

Описание методов

__construct() публичный Метод

Create a new engine instance.
public __construct ( Elasticsearch\Client $elastic, $index ) : void
$elastic Elasticsearch\Client
Результат void

delete() публичный Метод

Remove the given model from the index.
public delete ( Illuminate\Database\Eloquent\Collection $models ) : void
$models Illuminate\Database\Eloquent\Collection
Результат void

filters() защищенный Метод

Get the filter array for the query.
protected filters ( Laravel\Scout\Builder $builder ) : array
$builder Laravel\Scout\Builder
Результат array

getTotalCount() публичный Метод

Get the total count from a raw result returned by the engine.
public getTotalCount ( mixed $results ) : integer
$results mixed
Результат integer

map() публичный Метод

Map the given results to instances of the given model.
public map ( mixed $results, Model $model ) : Illuminate\Database\Eloquent\Collection
$results mixed
$model Illuminate\Database\Eloquent\Model
Результат Illuminate\Database\Eloquent\Collection

paginate() публичный Метод

Perform the given search on the engine.
public paginate ( Laravel\Scout\Builder $builder, integer $perPage, integer $page ) : mixed
$builder Laravel\Scout\Builder
$perPage integer
$page integer
Результат mixed

performSearch() защищенный Метод

Perform the given search on the engine.
protected performSearch ( Laravel\Scout\Builder $builder, array $options = [] ) : mixed
$builder Laravel\Scout\Builder
$options array
Результат mixed

update() публичный Метод

Update the given model in the index.
public update ( Illuminate\Database\Eloquent\Collection $models ) : void
$models Illuminate\Database\Eloquent\Collection
Результат void

Описание свойств

$index защищенное свойство

Index where the models will be saved.
protected string $index
Результат string