filagora/filagora-search
Filagora Search is a Laravel package that brings flexible, configurable search to your Filagora application. It lets you index and query models and content through a simple API, with sensible defaults and easy customization for fast, relevant results without complex setup. Designed for developers.
Architecture fit: Strong Laravel-native fit. The package uses contracts (SearchEngine, SearchIndex), a registry, queued model-event freshness (SyncSearchDocument), Artisan commands, a filagora:doctor check, and a portable filter tree. The separation is sensible: engines return document IDs, not Eloquent models; SearchIndex owns database fallback; SearchEngine owns external search. This aligns with Laravel service-container, queue, event, and package-discovery patterns.
Integration feasibility: Feasible for a Laravel team already running or willing to run Meilisearch. Integration requires composer install, config/env setup, index definition/registration, Meilisearch provisioning, queue worker capacity, settings sync, initial reindex/backfill, and health-check wiring. The package provides good primitives but not a turnkey migration from Laravel Scout or raw Meilisearch; teams must plan shadow indexing, dual-write, or backfill themselves.
Technical risk: Material pre-1.0 risk. v0.1.0 implies API instability and no backward-compatibility guarantee. Production search support is effectively Meilisearch via HTTP API, plus DatabaseEngine and ArrayEngine; other engines need adapters. The default freshness path queues on the sync connection unless queue is enabled, so unconfigured environments may make external search calls inline on save. after_commit should remain on to avoid indexing rolled-back data. Circuit-breaker fallback is valuable but fallback result parity and database load need validation. Multi-tenancy, authorization filters, retry/backoff, dead-letter behavior, index schema migration, and supported Laravel/PHP/Meilisearch versions are not evident from the release notes.
Key questions: Which Laravel, PHP, database, queue, and Meilisearch versions are supported? What is the recommended production queue configuration and retry policy? How are failed sync jobs surfaced and replayed? How should multi-tenant indexes and permission-aware filters be modeled? What is the index lifecycle for field/filterable-attribute changes? How are document IDs generated and stabilized? What is the expected result parity between Meilisearch and database fallback? How does reindex/resume behave under live writes? Is there a migration path from Scout or existing Meilisearch indexes? Who owns package support and security response?
TPM recommendation: Suitable for a time-boxed pilot or greenfield Laravel/Meilisearch service. Do not treat as broadly production-ready until queue defaults, version support, fallback parity, observability, and upgrade policy are validated.
Stack fit: Best fit is a Laravel application with MySQL/PostgreSQL, a real queue backend, and Meilisearch. The package is not a fit for non-Laravel PHP services or teams unwilling to operate Meilisearch. Teams needing Elasticsearch/OpenSearch/Algolia must budget for a SearchEngine adapter and conformance testing.
Migration path: For greenfield, define indexes, register them, sync settings, backfill/reindex, enable queued freshness, and wire health checks. For existing search, use a shadow Meilisearch index with the package’s index prefix, run filagora:search:sync-settings, backfill/reindex with batch size and pause controls, compare results against the current system and database fallback, then cut over. There is no evident direct importer from Scout; plan dual-write or a controlled backfill window.
Compatibility: Validate PHP/Laravel support, Meilisearch API compatibility, queue driver behavior, transaction/after-commit behavior, database fallback query performance, and Meilisearch filterable attributes. The FilterCompiler requires fields to be filterable on the index; configuration drift will cause query failures. Run the EngineConformance suite against the chosen Meilisearch version and any custom adapter.
Sequencing: 1) Non-production spike with ArrayEngine and Meilisearch; 2) implement SearchIndex definitions and registry; 3) configure engine, prefix, timeout, max_total_hits, and health settings; 4) run settings sync and verify Meilisearch tasks; 5) execute initial reindex/backfill with limits and pause; 6) enable queued sync with queue=true and after_commit=true only after worker capacity is confirmed; 7) run shadow comparisons and a fallback drill; 8) enable filagora:doctor, health checks, and alerts; 9) cut over with a documented rollback and reindex runbook.
Maintenance: Expect v0.1.x churn. Pin the package version, review release notes, and maintain index definitions, filterable attributes, and Meilisearch settings as first-class code. Budget for Meilisearch upgrades and package API changes. The conformance suite is a useful guardrail for custom engines but does not remove upgrade risk.
Support: Assign internal ownership to the Laravel/platform team. Create runbooks for reindex, backfill resume, settings sync, health-check failure, queue backlog, circuit-breaker open, and fallback overload. Package vendor/support model is unclear from the release notes; assume internal first-line support. Alert on non-zero health checks, recent failed Meilisearch tasks, sync job failures, queue depth, fallback rate, and search latency.
Scaling: Write volume drives sync job volume; default sync execution is a latency risk, so production should use a real queue. Reindex/backfill supports batch size, limit, start key, pause, and progress, which helps controlled operations. Meilisearch capacity, index size, filterable attributes, and max_total_hits need load testing. Database fallback can become a hot path during outages; capacity-plan for degraded-mode traffic. Index prefixes help isolate environments/tenants but do not by themselves solve tenant scoping.
Failure modes: Engine outage is logged and circuit-broken to database fallback, which preserves availability but may change relevance and increase DB load. Queue lag or failed sync jobs create stale documents. Inline sync queue use can add save latency. Disabling after_commit risks indexing uncommitted or rolled-back writes. Filter compilation can fail on non-filterable fields or mismatched escaping. Meilisearch task timeouts can leave settings/index changes unverified. Reindex interruption is resumable via start key but needs an operator runbook. Database fallback overload and stale-index recovery are the highest operational risks.
Ramp-up: Moderate. Laravel developers can integrate the package with a short spike, but production readiness requires Meilisearch operations knowledge, search relevance tuning, queue tuning, and fallback testing. Allocate discovery time for version compatibility, index design, multi-tenancy, and a fallback drill before enabling on critical read paths.
How can I help you explore Laravel packages today?