bneumann/opensearch-bundle
Composer 安装命令:
composer require bneumann/opensearch-bundle
包简介
Symfony bundle providing native OpenSearch integration with Doctrine ORM support, index management, and blue/green reindexing.
README 文档
README
A Symfony bundle providing native OpenSearch integration. Inspired by FOSElasticaBundle, built for OpenSearch from the ground up.
Features
- Multiple OpenSearch client support
- Automatic Doctrine ORM synchronization
- Blue/green reindexing with alias switching
- Configurable object transformation (reflection, Symfony Serializer)
- Repository pattern for search queries
- Index templates
- Event-driven extensibility (7 lifecycle events)
- Console commands for index management
Requirements
- PHP 8.1+
- Symfony 6.4 / 7.x / 8.x
- OpenSearch 2.x
Installation
composer require bneumann/opensearch-bundle
Quick Start
Configure a client and an index:
# config/packages/opensearch.yaml opensearch: clients: default: hosts: ['https://localhost:9200'] username: '%env(OPENSEARCH_USER)%' password: '%env(OPENSEARCH_PASS)%' ssl_verification: true indexes: products: index_name: 'products_%kernel.environment%' settings: number_of_shards: 1 number_of_replicas: 0 mappings: properties: name: { type: 'text' } sku: { type: 'keyword' } finder: hydration: orm persistence: driver: orm model: App\Entity\Product provider: true listener: true identifier: id
Create and populate the index:
bin/console opensearch:index:create products bin/console opensearch:index:populate products
Search using the finder service:
use Bneumann\OpensearchBundle\Finder\FinderInterface; public function __construct(private FinderInterface $finder) {} $results = $this->finder->find([ 'query' => [ 'match' => ['name' => 'bike'], ], ]);
Or use the repository pattern:
use Bneumann\OpensearchBundle\Repository\Repository; final class ProductRepository extends Repository { public function findBySku(string $sku): iterable { return $this->search([ 'query' => ['term' => ['sku' => $sku]], ]); } }
Documentation
Contributing
See CONTRIBUTING.md for guidelines.
License
This bundle is released under the MIT License.
bneumann/opensearch-bundle 适用场景与选型建议
bneumann/opensearch-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「search」 「bundle」 「doctrine」 「opensearch」 「indexing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bneumann/opensearch-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bneumann/opensearch-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bneumann/opensearch-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package to retrieve data from Google Search Console
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-24