- What is open-dxp/elasticsearch-client-bundle used for?
- It provides central configuration and a factory for creating Elasticsearch clients inside OpenDXP/Symfony applications. Other OpenDXP bundles use those dependency-injection-ready client services to index, query, and manage search data. It keeps Elasticsearch connection settings in one place instead of duplicating client setup.
- How do I install open-dxp/elasticsearch-client-bundle?
- Install it with Composer using composer require open-dxp/elasticsearch-client-bundle. Then register the bundle in your Symfony/OpenDXP kernel if your application does not auto-register bundles. Check the repository README for the exact bundle class and any required OpenDXP core dependencies.
- Does this package work with Laravel?
- No, it is designed as a Symfony/OpenDXP bundle and relies on Symfony's dependency-injection bundle system. Laravel does not use Symfony bundles in the same way, so you would need a Laravel-specific Elasticsearch client package or a custom adapter. The Elasticsearch PHP client itself can be used in Laravel, but this bundle's configuration and factory layer is not Laravel-native.
- How do I configure Elasticsearch hosts and credentials?
- Configuration is centralized through the bundle's Symfony/OpenDXP configuration, typically under a package-specific config key. You define connection details such as hosts and authentication there, and the bundle's factory builds clients from that configuration. See the README for the exact configuration tree and environment variable options.
- What Laravel version does this package support?
- This package does not target Laravel versions because it is a Symfony/OpenDXP bundle. Its compatibility is driven by the Symfony and OpenDXP versions declared in its composer.json. For Laravel projects, choose a package that explicitly lists support for your Laravel version.
- Can I use multiple Elasticsearch clients or connections?
- The bundle's central configuration and factory pattern are intended to let you define client services that other bundles can inject. Whether multiple named clients are supported depends on the bundle's configuration schema. Check the README or configuration reference for named client definitions before relying on multi-connection setups.
- How do I test code that depends on the Elasticsearch client?
- Because clients are exposed as dependency-injection services, you can mock or replace the client service in your test container. For integration tests, point the configuration at a test Elasticsearch instance or a compatible test double. Keep connection settings in environment-specific config so tests do not hit production clusters.
- Is this bundle suitable for production Elasticsearch workloads?
- It is intended to provide a central, reusable client configuration for OpenDXP/Symfony applications, so it can be part of production search workloads. You should still review connection pooling, timeouts, authentication, and error handling in your Elasticsearch client configuration. The bundle handles wiring, not Elasticsearch cluster tuning or query performance.
- What are the alternatives to open-dxp/elasticsearch-client-bundle?
- For Symfony, alternatives include direct use of the official Elasticsearch PHP client, Symfony's Elasticsearch integration bundles, or custom service factories. For Laravel, look at Laravel-specific Elasticsearch packages or a small service-provider wrapper around the official client. Choose based on whether you need OpenDXP bundle integration or a framework-native solution.
- How is the bundle maintained and where can I report issues?
- It is maintained as part of the OpenDXP project, with source code and issue tracking on GitHub at open-dxp/elasticsearch-client-bundle. Check the repository for release history, open issues, and contribution guidelines. For production use, review the latest tagged release and its compatibility with your OpenDXP version.