addons/elasticsearch
A Laravel/PHP addon that integrates Elasticsearch into your application, making it easy to index Eloquent models and run fast, flexible full-text searches through a simple, configurable bridge between Laravel and Elasticsearch.
Architecture fit. This is a thin adapter, not a search engine. Per its description, it sits between Laravel Scout and Elasticsearch and converts hits into Laravel-native LengthAwarePaginator and Collection objects, plus a logging helper. That is precisely the seam where in-house ES integrations usually rot — teams re-implement pagination and model hydration by hand and get edge cases wrong. Fit is strong if you are already Scout-based and want ->links(), Blade loops, API Resources, and Collection methods to work on search results without special-casing. Fit is weak if you need query DSL surface (aggregations, function scores, multi-index queries) that a helper layer does not expose, or if you are not on Scout at all.
Integration feasibility. MIT, Composer-installable in principle. The addons/elasticsearch naming suggests it was extracted from an application monorepo rather than built as a standalone distribution — verify Packagist publication, tagged releases, and whether installation requires a VCS/path repository. With 46 stars and 0 dependents you are effectively the first external consumer; validation against your own Laravel/Scout/ES version matrix is on you.
Technical risk — medium-high. Drivers, in order:
elasticsearch-php 7 vs 8 is a real compatibility triangle; the 8.x client changed namespaces, defaults, and error handling in ways that break adapters.from+size window. Deep paging needs search_after/PIT/scroll, which the description does not claim.Key questions to gate on:
babenkoivan/scout-elasticsearch-driver? Which upstream commit, and how far behind?elasticsearch-php client major?Engine implementation, or only paginator/collection/logger helpers (i.e., do you still need a driver)?index.max_result_window: clamp, throw, or search_after support?Stack fit. Laravel + Scout + ES 7/8 on PHP 8.1+. Best suited to read-heavy search over a bounded set of Eloquent models where Laravel ergonomics matter more than raw DSL access. Poor fit for analytics-style aggregation workloads or relevance tuning that product wants to control.
Migration path, by starting point:
database driver — lowest risk. Define toSearchableArray(), add engine config, backfill with scout:import, run dual-read comparison before flipping.Compatibility prove-out. Pin Laravel, Scout, and elasticsearch-php, then run a throwaway spike that installs the package, imports one model, requests page 2, and asserts types: LengthAwarePaginator with correct total, collection of Eloquent models, eager-loadable relations. Half a day de-risks most of the unknowns above.
Sequencing:
SearchService interface. Do this before the second consumer exists; retrofitting later is how these dependencies become permanent.Maintenance. Low code volume, high dependency churn. With zero dependents you inherit maintenance by default. Budget roughly 1–2 days per quarter for bumps plus incident time. If adopted, fork it internally — MIT makes that trivial, and it is the only way to patch a client-major upgrade on your schedule.
Support. Community-only at 46 stars. Assume one-to-two weeks best case for upstream answers and plan for "we own it" as the escalation path. The license is the real safety net, not the maintainer.
Scaling. The package will not be your bottleneck; the cluster will. Watch shard count against node count, the default 1s refresh interval on write-heavy indices, deep pagination past the 10k window (a latency cliff), sort-field doc_values, and memory when hydrating large result collections. Note that a hydrated Collection reintroduces N+1 unless you eager-load — the helper hands you a collection, not a query strategy.
Failure modes to design for:
Ramp-up. Small surface; a Laravel developer is productive in an afternoon. The real learning cost is Elasticsearch itself — mappings, analyzers, relevance, cluster operations — so budget one to two weeks for one engineer to be genuinely confident. Ship a runbook covering engine config, index naming, reindex procedure, and the fallback toggle.
Recommendation. Adopt behind an abstraction with an internal fork, or do not adopt. Price out the middle ground first: the paginator/collection helper pattern may be ~100 lines of in-house code, and at this dependency's size, owning it may cost less than depending on it.
How can I help you explore Laravel packages today?