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 Omega Search

Laravel Omega Search Laravel Package

divineomega/laravel-omega-search

Omega Search brings flexible, driver-based full-text search to Laravel. Make Eloquent models searchable, define indexed fields, and run ranked queries through a clean, unified API. Swap search backends without rewriting code—simple to configure, easy to extend, and built for real apps.

View on GitHub
Deep Wiki
Context7

Easily add an intelligent search engine to your Laravel powered website or web application

Frequently asked questions about Laravel Omega Search
How do I install divineomega/laravel-omega-search in a Laravel app?
Install it with Composer using composer require divineomega/laravel-omega-search, then confirm the package service provider is registered (auto-discovery handles this on modern Laravel, older versions may need it added to config/app.php). Publish and review any package configuration so your Omega Search connection details and drivers are set. After that, run your migrations if the package ships any and verify with a simple search call before wiring it into controllers.
Which Laravel and PHP versions does laravel-omega-search support?
Version 4.1.0 claims support for Laravel 5.1 through 13 with PHP 7.1 syntax compatibility, so it resolves on both legacy and current applications. Treat that as a package-code compatibility matrix rather than a guarantee that every Laravel version runs cleanly on every listed PHP version. PHP 7.1 and the older Laravel releases are end of life, so if you are on them, confirm dependency resolution works and weigh the security exposure.
How do I make an Eloquent model searchable with Omega Search?
You make a model searchable by defining which fields are indexed and letting the package return matching IDs that Eloquent then hydrates in relevance order. The result is that search stays behind your existing model and query abstractions instead of introducing a separate retrieval layer. Check the README for the exact trait or interface and indexed-field configuration used by your version.
Can I swap search backends without rewriting application code?
Yes, that is the core design goal: Omega Search is driver-based, and laravel-omega-search presents a clean, unified API over it. Because the package returns matching model IDs and lets Eloquent hydrate them, you can change the underlying search engine through configuration rather than touching call sites. This also removes the previous hard dependency on MySQL-specific SQL ordering, making staging and production parity easier across database engines.
Why does laravel-omega-search return every model when there are no search matches?
That was a defect in earlier releases: when Omega Search returned no matching IDs, the package passed an empty constraint into Eloquent and effectively exposed all records. Version 4.1.0 fixes this by returning an empty query instead, so no matches yields zero models. Treat 4.1.0 as the minimum acceptable version, and treat any pre-4.1.0 deployment as a data-exposure risk rather than just a search-quality bug.
Does laravel-omega-search work with SQLite and other non-MySQL databases?
Version 4.1.0 replaced MySQL-only FIELD() ordering with a parameter-bound CASE expression, so relevance ordering is portable to SQLite and other supported engines. The trade-off is that the generated SQL grows with the number of ranked IDs, and SQLite has stricter placeholder limits than MySQL. If you order large result sets, cap the number of IDs handed to Eloquent and test against your actual database engine.
How do I write regression tests for search in my Laravel application?
Add coverage for the cases that broke or changed: no search matches returns zero models, relevance order is preserved on your target database, pagination still behaves on empty results, and existing endpoints do not broaden results when Omega Search returns no IDs. Run those tests on both MySQL and at least one non-MySQL engine if you support both. This is especially important when upgrading from any pre-4.1.0 release.
What happens if the Omega Search engine is unavailable or times out?
The package is an Eloquent-facing adapter over Omega Search, so there is no built-in fallback or circuit breaker unless your version documents one. If the search engine is down or slow, the failure surfaces at query time, so wrap search calls in try/catch and decide whether to degrade to a database query, show an empty result set, or return an error. Add monitoring for empty-result rates and query latency so backend degradation is visible.
Is there a limit to how many result IDs laravel-omega-search can order by relevance?
The portable CASE ordering uses bound parameters, which is safer than raw FIELD() but produces larger SQL as the ranked ID list grows. Databases, especially SQLite, impose placeholder limits that a very large ID list can hit. Keep result sets bounded through pagination or a hard cap, and validate the maximum ID count you pass into the query on each environment.
Is laravel-omega-search actively maintained, and which version should I use?
Version 4.1.0 is the release to standardise on: it fixes the no-results data-exposure behavior, removes MySQL-only ordering, and improves compatibility and maintainability. If you are on any earlier v4.x release, upgrade directly to 4.1.0 in staging with database-specific regression tests before rolling out. The wide legacy support is convenient but keeps EOL PHP and Laravel versions in scope, so review your own support exposure rather than assuming the package guarantees them.
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast