Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Scout Advanced Meilisearch

Laravel Scout Advanced Meilisearch Laravel Package

alejandroakbal/laravel-scout-advanced-meilisearch

Laravel Scout extension adding advanced query builder filters (comparisons, grouped where/orWhere, between, notIn) plus two compatible drivers: meilisearch_advanced for better Meilisearch filtering/total counts and collection_advanced for in-memory testing.

View on GitHub
Deep Wiki
Context7

Advanced Meilisearch engine for Laravel Scout

Frequently asked questions about Laravel Scout Advanced Meilisearch
How do I enable advanced Meilisearch queries in Laravel Scout?
Set the Scout driver to `meilisearch_advanced` in your `config/scout.php` file. This unlocks extended query methods like `whereBetween`, `orWhereIn`, and comparison operators (`<=`, `>=`). For testing, use `collection_advanced` to mimic Meilisearch behavior in-memory.
What Laravel versions does this package support?
This package works with Laravel 9+ and 10+, requiring PHP 8.0+. Ensure your Laravel Scout version is compatible with the package’s requirements, as Scout updates may introduce breaking changes.
Can I use this package alongside Algolia or Scout’s default database driver?
No, this package replaces Scout’s default driver. However, you can use the `collection_advanced` driver for testing while keeping `meilisearch_advanced` for production. For hybrid setups, consider feature flags to toggle between drivers.
How does the `collection_advanced` driver work, and when should I use it?
The `collection_advanced` driver loads all searchable data into memory, simulating Meilisearch’s behavior for testing. Use it during development to validate filtering, sorting, and advanced queries without requiring a Meilisearch instance.
Does this package fix Meilisearch’s total count issue when using `->query()`?
Yes, the `meilisearch_advanced` driver corrects Meilisearch’s default behavior of fetching the entire dataset to calculate totals. It now accurately returns the count without overloading your search index.
How do I handle indexed arrays or nested fields in Meilisearch with this package?
The `meilisearch_advanced` driver fully supports Meilisearch’s indexed arrays and nested fields. Ensure your model’s `toSearchableArray()` method returns the correct structure, and define `attributesForFaceting` or `searchableAs` in your Meilisearch schema.
What are the performance implications of using Meilisearch vs. Scout’s default database driver?
Meilisearch is significantly faster for full-text search, typo tolerance, and faceted filtering compared to Scout’s database driver. However, self-hosting Meilisearch adds operational overhead. For small datasets, the `collection_advanced` driver may suffice for testing.
Can I use this package for large-scale applications (e.g., 10M+ records)?
Meilisearch scales well up to ~10M records, but beyond that, consider sharding or alternatives like Elasticsearch. Monitor your dataset size and query performance; the `meilisearch_advanced` driver optimizes for accuracy and speed within Meilisearch’s limits.
How do I test advanced queries like `whereBetween` or `orWhereIn` without a Meilisearch instance?
Use the `collection_advanced` driver in your tests. It supports all extended query methods and mimics Meilisearch’s behavior, allowing you to validate logic without external dependencies. Example: Set the driver in `phpunit.xml` or `.env.testing`.
What if Meilisearch goes down? Can I fallback to another driver?
This package doesn’t include built-in fallback logic, but you can implement it using feature flags or Laravel’s Scout’s `shouldSearchUsing` method. For example, switch to the database driver or cache results during outages, though this may impact search relevance.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai