Typesense
Typesense is an open-source, fast, typo-tolerant search engine optimized for developer productivity.
Environment Variables
Section titled “Environment Variables”SCOUT_DRIVER=typesenseTYPESENSE_HOST=your-typesense-hostTYPESENSE_PORT=443TYPESENSE_PROTOCOL=httpsTYPESENSE_API_KEY=your-api-keyCollection Schema
Section titled “Collection Schema”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:
php artisan scout:sync-index-settingsphp artisan scoutify:syncSelf-hosted vs Cloud
Section titled “Self-hosted vs Cloud”| Feature | Self-hosted | Typesense Cloud |
|---|---|---|
| Maintenance | Manual | Automatic |
| Backups | Manual | Included |
| Scaling | Manual | One-click |
Typesense Cloud is recommended for production if you want a zero-maintenance experience.