1.6 KiB
Instant Search
Powered by Laravel Scout, Koel provides an instant search feature that performs full-text, fuzzy searches against your music collection and returns the most relevant results as you type.
Configuration
Out of the box, Koel uses the TNTSearch, a powerful full-text search engine written entirely in PHP and requires no configuration.
Switching to Algolia is just a matter of changing the driver value to algolia
and populating the credentials into .env
:
SCOUT_DRIVER=algolia
ALGOLIA_APP_ID=<your-algolia-app-id>
ALGOLIA_SECRET=<your-algolia-secret>
Similarly, you can use Meilisearch:
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=<your-meilisearch-host>
MEILISEARCH_KEY=<your-meilisearch-key>
Update the Search Index
If the configuration is done after you have already populated Koel with songs, you'll need to update the search index. You can do so by running this command:
php artisan koel:search:import
Afterward and for future changes, the index will be updated automatically whenever you add, update, or delete songs, albums, or artists. There's literally nothing you need to do to keep the index up to date.
Usage
To use the instant search, simply start typing in the search box at the top left of the screen or pressing F. You'll see the results appear as you type.