aternovtsii/search-bundle
Aternovtsii Search Bundle is a lightweight search package for PHP applications. It provides a simple way to index content and run flexible queries, with easy configuration and integration into existing projects. Designed for developers who need straightforward search with minimal setup.
EXIST operator (usable as new LogicalNot(new FieldFilter('date', Operator::EXISTS))), which unlocks null/existence filtering — a recurring requirement for catalog, CMS, and compliance-driven filtering that previously forced custom query code.LIKE queries with sub-second Elasticsearch responses.LogicalNot + EXISTS) covers the "is empty" half of the filter set without hand-rolled Elasticsearch queries.defaultLocale config).max_result_window in v0.1.6) and avoiding over-provisioning — and by keeping filter logic in-package rather than in bespoke query builders that need ongoing maintenance.LIKE '%term%') are slow (>500ms) or scale poorly (e.g., 10K+ records).User with Address and Order data) without manual joins.EXIST operator (v1.4.0) covers this declaratively, including negated cases via LogicalNot.WHERE name LIKE ?), and SQL performance is acceptable."This package lets us ship search features 3x faster by leveraging Elasticsearch’s speed without hiring specialized engineers. For example, we can replace slow SQL searches in [Product X] with sub-second results, improving user retention by [Y]%. It’s cost-effective (MIT license, no vendor lock-in) and aligns with our Laravel 10+ stack. The bundle handles complex use cases like multi-language support, real-time updates, and — as of v1.4.0 — 'missing/empty data' filters (e.g., products with no publish date, leads with no owner) that our ops and merchandising teams have been requesting. That reduces dev overhead by [Z] hours per feature. Risks are bounded — the surface area is small, so we can isolate or replace it if needed."
Key Outcomes:
*"The aternovtsii/search-bundle is a Symfony 8-compatible wrapper for Elasticsearch/OpenSearch that integrates with Doctrine in Laravel. Here’s why it’s a strong fit:
- Zero Reinvention: Handles indexing, querying, sorting, and filtering for Doctrine entities out-of-the-box (e.g., nested/relational data).
- Symfony 8 Alignment: Works natively with Laravel 10+ (low risk of conflicts).
- Key Features:
- Auto-reindexing via Doctrine events (v0.1.3).
- Multi-date and translatable field support (v1.2.1, v0.1.5).
- OpenSearch/Elasticsearch flexibility (v0.1.4).
- Optimized for large datasets (e.g.,
max_result_windowin v0.1.6).EXISToperator +LogicalNotcomposition (v1.4.0) — lets us express "field is present / field is null" without dropping to raw Elasticsearch queries:new LogicalNot(new FieldFilter('date', Operator::EXISTS)). Purely additive, no breaking changes.- Integration Effort: ~1–2 days for a POC, with minimal dependency conflicts if we pin Symfony versions.
- Alternatives: Algolia (costly), custom Elasticsearch client (high dev effort), or SQL-only (poor performance).
Recommendation: Pilot in [Project Y] to validate performance gains vs. current search, exercising the new
EXISTfilter in a real "incomplete record" workflow. If successful, adopt for all new search features."*
Technical Risks Mitigated:
composer.json.FieldFilter usage are unaffected.EXIST currently composes via LogicalNot; validate that any needed AND/OR combinations of existence + range + term filters are expressible before committing.SYMFONY_DEPRECATIONS_HELPER) and track release cadence — the package is young and lightly adopted.How can I help you explore Laravel packages today?