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

Elasticsearch Bundle Laravel Package

ongr/elasticsearch-bundle

The Ongr Elasticsearch Bundle integrates Elasticsearch with Symfony applications, offering configuration-driven document object mapping, repositories, indexing, bulk operations, aggregations, and flexible query building for scalable full-text search and analytics in PHP projects.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Search-as-a-feature go/no-go. Whether to invest in relevance-ranked search versus LIKE/full-text in the primary database. This package represents the "self-hosted Elasticsearch" branch of that decision: document mapping, repository abstractions, index/alias management, and bulk indexing wired into a framework's DI container. It shows concretely what "we own search infrastructure" costs in code terms.
  • Build vs. buy on search. Useful reference point when weighing managed search (Algolia, Typesense Cloud, Meilisearch) against self-hosted ES. The bundle itself is free/MIT, but it commits you to operating a cluster — that total cost is the real line item in the comparison.
  • Roadmap sequencing for discovery features. Faceted filtering, autocomplete, geo search, per-locale indexes, and aggregation-driven reporting all sit on the same index. Confirming the bundle's multi-index/alias and locale support tells you whether those roadmap items are incremental or a re-platforming exercise.
  • Architecture: search index as a derived read model. Supports an event-driven reindexing pattern (write to system of record, project into ES). Relevant if the roadmap includes high-read, low-write catalog or content surfaces.
  • Stack-fit decision (the important one). This is a Symfony bundle, not a Laravel package. For a Laravel codebase the honest conclusion is: do not adopt as a dependency. Extract the pattern — attribute/annotation-driven document mapping and repository-per-index — and implement it on top of elasticsearch/elasticsearch plus Laravel Scout or tpetry/laravel-elasticsearch.
  • Observability side-use case. ES as a log/metric sink (ELK-style) is a separate, lower-risk adoption path that does not require this bundle at all; keep it out of the search decision to avoid conflating two purchases.

When to Consider This Package

Consider it when:

  • You run a Symfony 5.x/6.x application that already operates Elasticsearch and you want to remove boilerplate: mapping PHP objects to indices, repository-style queries, DI-configured connections, console commands for bulk (re)indexing.
  • You need multi-index and alias management (blue/green reindexing, per-locale indices) and would otherwise hand-roll it.
  • You want documents-as-code so index mappings live in version control alongside the models that produce them, rather than in Kibana.
  • Your team is Symfony-fluent and values convention over a thin, manually assembled client.
  • You are on PHP 8.x — v6.3.0 adds PHP 8 support, so runtime compatibility is no longer the blocker it was on the previous release line.

Look elsewhere when:

  • You are on Laravel. Different container, different console, different ORM. Use Scout plus an ES driver, or a Laravel-native ES client. Adopting a Symfony bundle here is a category error — and v6.3.0 does nothing to change this, since it is a PHP-version fix, not a framework-portability one.
  • You need Elasticsearch 8/9. The v6.3.0 change is PHP 8 support, not Elasticsearch 8 support. The 8.x story (removal of mapping types, tightened security defaults, new client API) remains unaddressed in the release notes. Treat ES 8/9 compatibility as unverified until you spike it — this is now the single largest open risk.
  • You require vendor responsiveness or a maintenance guarantee. v6.3.0 is a one-line release after a long quiet period: it proves the repo is not abandoned, but a single-issue changelog is evidence of life support, not of an active roadmap. Budget for a fork-and-own contingency rather than assuming upstream will track future ES client changes.
  • Your search needs are modest. Postgres full-text or a lighter engine (Meilisearch/Typesense) will beat ES on operational cost for sub-million-document corpora.
  • You are not on the Symfony HTTP kernel / DI. The value is entirely in the integration; without it you are paying for a wrapper you cannot use.

How to Pitch It (Stakeholders)

For executives — one paragraph: Search quality is a conversion lever, and Elasticsearch is a credible, mature engine for it. The package under review, however, is a Symfony integration layer, not a Laravel one, so it is not something we can install into our stack. The new v6.3.0 release adds PHP 8 support, which is a good hygiene signal — the project is maintained, not abandoned — but it is a runtime compatibility fix, not a feature release, and it does not touch the Elasticsearch 8/9 question that actually gates us. It remains valuable as a design reference: it shows the shape of a maintainable search integration and helps us price the "build it ourselves" option. My recommendation is not to adopt the dependency, and instead to run a short spike comparing (a) Laravel Scout with an Elasticsearch driver and (b) a managed search service, on the two or three roadmap features that actually need ranked search. Both options are low-commitment; the decision reverses cheaply if we are wrong.

For engineering — the substance:

  • The bundle's real contribution is ergonomics, not capability: document mapping via attributes, repository abstractions, DI-wired connections, alias/multi-index management, and bulk reindex commands. Worth copying those ideas into a Laravel-native module rather than importing the code.
  • What v6.3.0 changes: PHP 8 runtime support only. It removes the "won't run on our PHP version" objection for a hypothetical Symfony host, and it confirms the maintainer is still responsive at some cadence. It does not add ES 8/9 client support, does not touch mapping-type removal, and does not modernise the connection/security defaults.
  • Version risk remains the blocker, just narrowed. The blocker is no longer PHP — it is the Elasticsearch server/client generation. The PHP client and mapping-type changes in ES 8 are breaking; inheriting an unmaintained compatibility surface is the cost, not the porting effort.
  • Maintenance profile is still thin. Low star count, low activity, effectively single-maintainer, and this release is a single line item. If we did adopt it we would need a fork-and-own contingency, which erases most of the "buy" advantage. The upside is that a project this small is cheap to fork if we ever needed to.
  • Suggested spike, timeboxed: one index, one document type, one facet query, one full reindex — implemented against Scout/ES. Success criteria: reindex under N minutes, p95 query latency target, and a documented alias-swap procedure for zero-downtime mapping changes. Add a check on the ES server version we actually intend to run, since that is where the residual uncertainty now sits.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console