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
Ongr Elasticsearch Bundle

Ongr Elasticsearch Bundle Laravel Package

stexaz/ongr-elasticsearch-bundle

A Symfony bundle for integrating Elasticsearch with ONGR, providing document mapping, index management, repositories, and search tooling for scalable full-text search and filtering in PHP apps. It streamlines configuration and query building while keeping Elasticsearch usage idiomatic in Symfony.

View on GitHub
Deep Wiki
Context7

stexaz/ongr-elasticsearch-bundle is a Symfony bundle that integrates Elasticsearch into PHP applications through a clean, document-oriented abstraction. It maps PHP objects to Elasticsearch documents using annotations, letting you work with indexed data through repositories instead of hand-written query arrays, while Symfony's dependency injection container wires up clients, indexes, and services automatically.

  • Annotation-based document mapping for fields, analyzers, and index settings
  • Repository pattern with built-in support for search, filtering, and aggregation
  • Index management utilities for creating, refreshing, and reindexing indices
  • Bulk operations for efficient batch indexing and updates
  • Symfony DI integration for configuration-driven client and index setup
Frequently asked questions about Ongr Elasticsearch Bundle
Is stexaz/ongr-elasticsearch-bundle compatible with Laravel?
No. This is a Symfony bundle, not a Laravel package. It relies on Symfony's dependency injection container, bundle configuration, and kernel lifecycle hooks, none of which Laravel's service container or package discovery consumes natively. Making it work in Laravel would require bridging two incompatible DI paradigms or extracting and rewiring the underlying ONGR components, which is non-trivial and forfeits upstream support.
How do I install stexaz/ongr-elasticsearch-bundle?
In a Symfony application you would run composer require stexaz/ongr-elasticsearch-bundle, register the bundle in your kernel or bundles.php, and configure it under the ONGR Elasticsearch configuration key. There is no supported composer require path to a working Laravel install. The last release was published on 2017-10-27, so expect dependency resolution issues on modern PHP and Symfony versions.
What PHP, Symfony, and Elasticsearch versions does this bundle support?
The supported matrix is roughly PHP 7.0/7.1, Symfony 2.8 through 4.x, and Elasticsearch 2.x through 5.x. These are hard ceilings rather than soft warnings. The code predates PHP 8 and modern Symfony bundle conventions, and the Elasticsearch mapping APIs have changed materially since ES 5.
What features does the ONGR ElasticsearchBundle provide?
It provides document mapping, repository-style querying, index management, and flexible configuration for building search experiences in Symfony. The bundle wraps the ONGR ElasticsearchBundle components and integrates them with Symfony's DI container and event dispatcher. Those features are real, but they are delivered through Symfony-specific conventions rather than framework-agnostic PHP.
Does this bundle work with Elasticsearch 7 or 8?
No. The bundle targets Elasticsearch 2.x through 5.x, and its mapping and client APIs are not compatible with ES 7 or 8. Running it against a modern cluster is not a supported configuration. If your production cluster is on ES 7/8, you should use the official elastic/elasticsearch-php client or a maintained framework integration instead.
Is this package still maintained and safe for production?
Treat it as high risk. The last release was 2017-10-27, it has zero stars and zero dependents, and there is no evidence of an active maintainer, security policy, or issue triage. Transitive dependencies such as old symfony/* components and old elasticsearch/elasticsearch carry known CVEs, and with no upstream patching you inherit them permanently. It is not a candidate for new development.
How does this fork differ from the upstream ongr/elasticsearch-bundle?
It is a fork of a fork, with the chain running stexaz to andriuspetrauskis to upstream ONGR. There is no clear signal on who owns the fork, why it exists, or what it changes versus upstream. Auditing those deltas is mandatory before any use, and the safer choice is normally to depend on the upstream ongr/elasticsearch-bundle at a version your runtime supports.
Can I run this bundle on PHP 8?
No, not cleanly. The code is from the PHP 7.0/7.1 era and Symfony bundle conventions have changed since then. Assume PHP 7.2 or lower as the practical ceiling. Running it on PHP 8.x is unsupported and likely to produce deprecation or runtime failures.
What should I use instead for Elasticsearch in Laravel?
Use Laravel Scout with the official elasticsearch/elasticsearch driver, or a managed engine such as Meilisearch, Typesense, or Algolia. Alternatively, call elastic/elasticsearch-php directly and own a thin repository layer around your models. These options give you PHP 8.x compatibility, active maintenance, and framework-native model indexing.
How do I handle document mapping in a modern Symfony app if I need ONGR-style repositories?
Depend on the upstream ongr/elasticsearch-bundle at whatever version your Symfony runtime supports, if you specifically need the ONGR document-mapping style. Otherwise, use the official Elasticsearch PHP client directly and own a thin repository layer in your application. For existing consumers of this specific fork, pin the exact commit, vendor it through a Composer VCS or path repository, and schedule replacement.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections