The search system is integrated using Laravel Scout.

Laravel Scout Documentation{.link}


To begin indexing models you simply need to make the stream or model searchable.

Via Control Panel

You can mark streams as searchable within the control panel in various areas.

Via Migration

When creating a stream via migration you can set searchable to true to make the stream searchable.

Streams Migrations{.link}


You can use the Streams repository to fetch a stream instance, set it's searchable attribute to true and then saving said stream instance.

use \Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;

$repository = app(StreamRepositoryInterface::class);

$stream = $repository->findBySlugAndNamespace('vehicles', 'rvs');

$stream->searchable = true;



In general indexing works exactly the same as it does in Scout.

Scout Indexing{.link}

You also have access to a few other methods of indexing.


Any time a searchable model is saved it will be synced automatically.

Index Command

The streams:index Artisan command will flush and re-index all or specific streams.

Index Command{.link}