Weave 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 Mysql Driver Laravel Package

yab/laravel-scout-mysql-driver

A Laravel Scout engine that powers full-text search directly with MySQL, so you can skip Elasticsearch or Algolia. Adds relevance ranking, boolean and wildcard queries, and easy model integration using native MySQL indexes.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package slots into Laravel Scout's engine contract, so it is architecturally "thin": Scout owns indexing orchestration (searchable trait, model observers, queued index jobs), and this driver translates search()/paginate() calls into MySQL MATCH ... AGAINST queries against FULLTEXT indexes.
  • Fit is good only where MySQL is already the system of record and search requirements are modest (keyword matching, relevance-ordered result sets). It is not a substitute for a dedicated search tier — no faceting, typo tolerance, synonyms management, highlighting, or geo.
  • Critically, the package is archived with a last release in December 2021. That places it before Laravel Scout 9/10's native database engine, which covers most of the same use case with first-party support. The low opportunity score (17.4) is consistent with this: the package's core value has largely been absorbed upstream.
  • 515 stars but 0 dependents is a weak adoption signal — treat popularity as historical, not as production validation.

Integration feasibility

  • Integration is a small, well-bounded change: add the driver class to config/scout.php, add FULLTEXT indexes to the searchable tables via migration, and run scout:import to backfill. Realistically a 1–3 day proof of concept for a mid-sized Laravel codebase.
  • The real work is not wiring, it is index design and query semantics: innodb_ft_min_token_size (default 3) silently excludes short terms, stopword lists vary by MySQL version, and natural-language mode relevance is not tunable in the way stakeholders expect.
  • Dependency risk is the gating factor: the release predates Laravel 10/11 and Scout 10.x, so Composer constraints will likely conflict on a modern stack. Confirm the supported matrix before committing.

Technical risk

  • Abandonment risk: high. Archived, no security response, no PHP 8.3/Laravel 11 compatibility guarantees, no fixes for MySQL 8.4 changes.
  • Correctness risk: medium. Index drift is the classic failure — bulk updates, DB::table() writes, or soft-delete edge cases bypass Scout observers, leaving stale fulltext indexes that return wrong results without erroring.
  • Relevance risk: medium. MySQL fulltext scoring is crude relative to Algolia/Meilisearch; product expectations set by SaaS search are unlikely to be met.
  • Mitigation is cheap. MIT license and a small code surface (low hundreds of LOC) mean the code can be vendored into the application or a private fork, converting an external dependency into owned code. This is the recommended posture if the package is used at all.

Key questions

  1. Are the search requirements actually satisfiable by Scout's native database engine (Laravel 9+)? If yes, this package is redundant.
  2. What Laravel/PHP/Scout versions are on the target stack, and does the pinned constraint resolve?
  3. Do we need typo tolerance, faceting, or multilingual (CJK/ngram) matching? Any "yes" disqualifies this driver.
  4. Who owns the fork if adopted — and is the team willing to accept ongoing ownership of an unmaintained component?
  5. What is expected query volume and index size? Fulltext indexes add write amplification to the primary OLTP database.

Integration Approach

Stack fit

  • Requires MySQL 5.7+/8.0 with InnoDB FULLTEXT support and a Laravel app already using Scout. MariaDB works but is a separate compatibility question worth testing explicitly.
  • Best fit: single-database Laravel monoliths with internal/admin search, small-to-medium corpora (<1–2M searchable rows), and a hard constraint against adding a search service.

Migration path

  1. Pin the exact archived version (composer require yab/laravel-scout-mysql-driver:<exact>) — never use a floating constraint against an archived package.
  2. Immediately vendor or fork the driver class into the app (App\Search\MySqlEngine) so future PHP/Laravel upgrades can be patched locally without waiting on upstream. Register the local class in config/scout.php.
  3. Add FULLTEXT index migrations ($table->fullText(['title','body'])), sized against the actual searchable columns, not every text column.
  4. Backfill with scout:import in batches during a low-traffic window; validate result parity against the current search implementation.

Compatibility

  • Verify Composer resolution against the app's laravel/framework and laravel/scout constraints first — the 2021 release date makes conflict likely on Laravel 10/11. If it conflicts, patch the constraint in a fork rather than downgrading the framework.
  • Check MySQL server config: innodb_ft_min_token_size, innodb_ft_enable_stopword, and ngram token size if non-Latin content is in scope.

Sequencing

  1. Spike (1 week): benchmark native Scout database engine vs. this driver on a representative corpus. Default to native unless it demonstrably fails.
  2. If the driver is chosen: fork/vendor → PoC in a branch → relevance and latency benchmark → config-flagged rollout → deprecate the old search path.
  3. Define an exit path at adoption time: either Scout native engine or Meilisearch, with a thin engine abstraction so swapping is a config change.

Operational Impact

Maintenance

  • Effectively zero upstream maintenance. The team inherits bug-fix, security, and framework-compatibility responsibility from day one. Budget a modest but recurring line item (~1–2 engineer-days per framework upgrade cycle) and assign a named owner.
  • Because the code is small and MIT-licensed, the ownership cost is manageable — but it is not free, and it will not appear on any vendor roadmap.

Support

  • No upstream support channel. Internal runbooks must document fulltext semantics (token size, stopwords, boolean vs. natural language mode) because failure modes are silent and often misdiagnosed as application bugs.
  • Add an observability check: a scheduled job comparing Model::count() to indexed document counts to detect drift.

Scaling

  • Search load lands on the primary OLTP database. Fulltext queries are CPU- and IO-intensive; index maintenance adds write amplification and disk growth on every insert/update.
  • Horizontal scaling is limited to routing reads to a replica — acceptable at moderate volume, not at high query-per-second search traffic.
  • No sharding story, no dedicated relevance tuning, no cache layer beyond what the app adds.

Failure modes

  • Silent stale index: writes outside Eloquent/Scout leave outdated results; no error surfaces.
  • Silent empty results: terms below ft_min_token_size or in the stopword list return nothing rather than partial matches.
  • Relevance degradation: no boosting, no recency weighting without custom SQL.
  • Composer/version breakage: an unrelated framework upgrade can make the package uninstallable, blocking CI.
  • Long-running queries: unbounded MATCH queries on large tables can saturate connections; pagination must be capped.

Ramp-up

  • Low for Laravel developers — config plus one migration. The genuine learning curve is MySQL fulltext behavior, which most PHP engineers have not operated in production.
  • Recommend a short internal write-up covering index design, tokenization settings, and the drift-detection job before handoff to on-call.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core