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

Search Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Search Functionality Roadmap: Accelerates implementation of Elasticsearch/OpenSearch integration for Doctrine-based Laravel applications, reducing time-to-market for search-heavy features (e.g., e-commerce product search, content discovery, or analytics dashboards). The v1.4.0 release adds an 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.
  • Build vs. Buy: Buy—avoids reinventing search infrastructure (indexing, querying, sorting, filtering) while maintaining flexibility for customization (e.g., multi-date fields, translatable fields, existence/null filters). Ideal for teams lacking Elasticsearch expertise.
  • Use Cases:
    • Scalable Search: Replace slow SQL LIKE queries with sub-second Elasticsearch responses.
    • Full-Text Search: Index and search across nested/relational Doctrine entities (e.g., blog posts with comments, user profiles with tags).
    • Completeness / Data-Quality Filters (new in v1.4.0): Surface or exclude records missing optional data — e.g., "products without a publish date," "leads without an assigned owner," "profiles with no avatar." Negated existence (LogicalNot + EXISTS) covers the "is empty" half of the filter set without hand-rolled Elasticsearch queries.
    • Multi-Language Support: Leverage Symfony’s translation contracts for locale-aware search (e.g., defaultLocale config).
    • Real-Time Updates: Use Doctrine event-based reindexing (v0.1.3) to sync search indexes with database changes automatically.
    • Compliance: OpenSearch/Elasticsearch compatibility enables cloud-agnostic deployments (AWS OpenSearch, self-hosted Elasticsearch).
  • Architectural Alignment: Supports microservices or API-first Laravel apps where search is decoupled from the main database (e.g., via Symfony’s HTTP client for remote Elasticsearch clusters).
  • Cost Efficiency: Reduces cloud search costs by optimizing index templates (e.g., 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.

When to Consider This Package

Adopt When:

  • Search Complexity: Your Laravel app requires advanced search (fuzzy matching, geospatial queries, aggregations, existence/null filtering) beyond SQL capabilities.
  • Performance Needs: Current search queries (e.g., LIKE '%term%') are slow (>500ms) or scale poorly (e.g., 10K+ records).
  • Symfony/Laravel Stack: Using Laravel 10+ or Symfony 8+ components (e.g., HTTP client, Messenger) to minimize integration friction.
  • Doctrine ORM: Already using Doctrine for entities; the bundle auto-generates index documents from Doctrine metadata.
  • Multi-Field Search: Need to search across related entities (e.g., User with Address and Order data) without manual joins.
  • Data-Completeness Filtering: Product or ops requirements include "records missing field X" / "records with field X present" — the EXIST operator (v1.4.0) covers this declaratively, including negated cases via LogicalNot.
  • Real-Time Sync: Require automatic reindexing on entity updates (via Doctrine events) to avoid stale search results.
  • OpenSource Budget: Prefer MIT-licensed solutions over proprietary search SaaS (e.g., Algolia) with recurring costs.

Look Elsewhere When:

  • Legacy Laravel: Using Laravel <10 without Symfony 8 compatibility (high risk of dependency conflicts).
  • Simple Search: Basic keyword search suffices (e.g., WHERE name LIKE ?), and SQL performance is acceptable.
  • Non-Doctrine Apps: Using Eloquent-only or raw SQL; the bundle assumes Doctrine entities.
  • Managed Search: Prefer hosted solutions (Algolia, Meilisearch) with built-in scaling/uptime SLAs.
  • Custom Elasticsearch Needs: Require deep Elasticsearch customization (e.g., custom analyzers, ingest pipelines) beyond the bundle’s abstractions — note the v1.4.0 operator set is still narrow (existence plus existing field filters), so complex boolean/range compositions may still need raw query access.
  • High Availability: Need multi-region Elasticsearch clusters with the bundle’s current OpenSearch/Elasticsearch client support.
  • Active Maintenance: The package has no stars/dependents; releases are small and incremental (v1.4.0 adds a single operator), so roadmap velocity is a real unknown — confirm maintenance intent before betting a core feature on it.

How to Pitch It (Stakeholders)

For Executives (Business Leaders):

"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:

  • Faster time-to-market for search-driven features.
  • Scalable performance for growing datasets.
  • Richer filtering (now including data-completeness) without custom query work.
  • Lower operational costs vs. managed search services.

For Engineering (Technical Leaders):

*"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_window in v0.1.6).
    • EXIST operator + LogicalNot composition (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 EXIST filter in a real "incomplete record" workflow. If successful, adopt for all new search features."*

Technical Risks Mitigated:

  • Dependency conflicts: Pin Symfony versions in composer.json.
  • Backward compatibility: Test in Laravel 10+ first; avoid Laravel <10. v1.4.0 is additive — existing filters and FieldFilter usage are unaffected.
  • Query expressiveness: EXIST currently composes via LogicalNot; validate that any needed AND/OR combinations of existence + range + term filters are expressible before committing.
  • Maintenance: Monitor for Symfony 8 deprecations (enable SYMFONY_DEPRECATIONS_HELPER) and track release cadence — the package is young and lightly adopted.
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin