Installation
Install MeiliSearch on your system:Using Docker
Using Binary
Download and run MeiliSearch:Using Package Manager
Environment Configuration
Configure MeiliSearch connection in your.env file:
Laravel Scout driver. Must be set to
meilisearch.Queue search index updates for better performance.
Set to
true in production to avoid blocking requests during indexing.Prefix for all search index names. Useful when sharing MeiliSearch between multiple applications.Example:
lionz_, production_MeiliSearch server URL.Examples:
- Local:
http://localhost:7700 - Remote:
https://meilisearch.example.com
MeiliSearch master key for authentication.
Example Configuration
.env
Index Configuration
Lionz IPTV Downloader configures two MeiliSearch indexes with specific settings for optimal search performance:Series Index
Indexes TV series and shows with the following settings:Fields that can be used for sorting search results.Values:
created_at- Creation datelast_modified- Last modification datereleaseDate- Release daterating- Rating scorerating_5based- 5-star rating
Fields that can be used for filtering search results.Values:
genre- Genre/categorycategory_id- Category identifier
VOD Streams Index
Indexes video-on-demand content with the following settings:Fields that can be used for sorting VOD results.Values:
created_at- Creation dateadded- Date added to libraryrating- Rating scorerating_5based- 5-star rating
Fields that can be used for filtering VOD results.Values:
category_id- Category identifier
Initial Indexing
After configuring MeiliSearch, import your existing data:Import All Content
Flush and Re-import
If you need to rebuild indexes from scratch:If
SCOUT_QUEUE=true, indexing operations will be queued. Run php artisan queue:work to process them.Automatic Syncing
With Scout configured, models are automatically synced to MeiliSearch when:- New series or VOD streams are created
- Existing content is updated
- Content is deleted
Search Configuration
MeiliSearch provides typo-tolerant search out of the box with these features:- Typo Tolerance: Finds results even with spelling mistakes
- Prefix Search: Matches partial words (e.g., “sci” matches “science fiction”)
- Ranking: Results are ranked by relevance
- Fast: Sub-50ms search responses
Searchable Fields
The following fields are searchable in the application: Series:- Name/title
- Plot/description
- Genre
- Cast
- Director
- Name/title
- Description
- Genre
- Category
Performance Tuning
Queue Configuration
For better performance, enable queued indexing:.env
Database Transactions
Scout waits for database transactions to commit before syncing to MeiliSearch. This is configured inconfig/scout.php:
This prevents discarded data from being synced to the search index.
Chunk Sizes
Control batch import chunk sizes inconfig/scout.php:
Monitoring
Check MeiliSearch status and statistics:Troubleshooting
Connection Failed
If the application can’t connect to MeiliSearch:-
Verify MeiliSearch is running:
-
Check
MEILISEARCH_HOSTmatches your MeiliSearch URL -
Verify
MEILISEARCH_KEYmatches your master key
Search Not Working
If search returns no results:-
Check if indexes exist:
-
Verify data is indexed:
-
Check queue is processing (if
SCOUT_QUEUE=true):
Slow Indexing
If indexing is slow:-
Enable queue for background processing:
-
Use Redis instead of database for queue:
-
Run multiple queue workers:
Production Recommendations
Additional Resources
- MeiliSearch Documentation
- Laravel Scout Documentation
- MeiliSearch Cloud - Hosted solution