NullEngine
class NullEngine extends Engine
No-op engine for disabling search functionality.
Useful for testing or temporarily disabling search without code changes.
Methods
Pluck and return the primary keys of the given results.
Get the total count from a raw result returned by the engine.
Create a search index.
Delete a search index.
Pluck and return the primary keys of the given results using the given key name.
Details
at line 23
void
update(Collection $models)
Update the given models in the search index.
at line 31
void
delete(Collection $models)
Remove the given models from the search index.
at line 39
mixed
search(Builder $builder)
Perform a search against the engine.
at line 47
mixed
paginate(Builder $builder, int $perPage, int $page)
Perform a paginated search against the engine.
at line 55
Collection
mapIds(mixed $results)
Pluck and return the primary keys of the given results.
at line 63
Collection
map(Builder $builder, mixed $results, Model $model)
Map the given results to instances of the given model.
at line 71
LazyCollection
lazyMap(Builder $builder, mixed $results, Model $model)
Map the given results to instances of the given model via a lazy collection.
at line 79
int
getTotalCount(mixed $results)
Get the total count from a raw result returned by the engine.
at line 87
void
flush(Model $model)
Flush all of the model's records from the engine.
at line 95
mixed
createIndex(string $name, array $options = [])
Create a search index.
at line 103
mixed
deleteIndex(string $name)
Delete a search index.
in
Engine at line 90
Collection
mapIdsFrom(mixed $results, string $key)
Pluck and return the primary keys of the given results using the given key name.
in
Engine at line 98
Collection
keys(Builder $builder)
Get the results of the query as a Collection of primary keys.
in
Engine at line 106
Collection
get(Builder $builder)
Get the results of the given query mapped onto models.
in
Engine at line 118
LazyCollection
cursor(Builder $builder)
Get a lazy collection for the given query mapped onto models.