Skip to content

Typesense

Typesense is an open-source, fast, typo-tolerant search engine optimized for developer productivity.

SCOUT_DRIVER=typesense
TYPESENSE_HOST=your-typesense-host
TYPESENSE_PORT=443
TYPESENSE_PROTOCOL=https
TYPESENSE_API_KEY=your-api-key

Typesense requires schemas to be declared before indexing. Configure this in config/scout.php:

'typesense' => [
'model-settings' => [
\App\Models\User::class => [
'collection-schema' => [
'fields' => [
['name' => 'name', 'type' => 'string'],
['name' => 'email', 'type' => 'string'],
],
'default_sorting_field' => 'created_at',
],
],
],
],

Apply the schema changes:

Terminal window
php artisan scout:sync-index-settings
php artisan scoutify:sync
FeatureSelf-hostedTypesense Cloud
MaintenanceManualAutomatic
BackupsManualIncluded
ScalingManualOne-click

Typesense Cloud is recommended for production if you want a zero-maintenance experience.