shopsys/postgres-search-bundle
Shopsys Postgres Search Bundle brings native full-text search to Shopsys projects using PostgreSQL, letting you index and query products quickly without running a separate search engine.
ts_rank_cd), not a Composer dependency.intaro/postgres-search-bundle and added a 0.1 tag only for Composer version management, with 0 stars and 0 dependents. The PM-relevant signal is that upstream is not reliably versioned and nobody is on the hook for defects. That argues for adopting the upstream or owning a thin internal implementation.Consider the technique (native Postgres FTS with GIN indexes) when all of the following hold:
upsert/DB::statement bypass model events in every ecosystem, and that is this design's weakest inherited assumption.Consider the package itself only if you are on Symfony with Doctrine ORM and specifically want the entity-mapping and listener integration path, and you have accepted fork maintenance.
Look elsewhere when:
shopsys/postgres-search-bundle to composer.json and try to boot a Symfony bundle inside Laravel.Mandatory gates before any commitment: confirm the PostgreSQL floor (websearch_to_tsquery needs 11+), verify unaccent/pg_trgm can be enabled in every environment including managed Postgres you don't control (RDS, Cloud SQL, Supabase), benchmark on a production-shaped dataset, and get a written answer on which upstream commit 0.1 pins to and who patches it when Postgres or Doctrine changes underneath. Prefer upstream intaro/postgres-search-bundle unless the Shopsys tag is specifically needed — otherwise you take on fork maintenance for a versioning convenience.
To executives: This is a cost-deferral play, not a search strategy. PostgreSQL — which we already run and pay for — can deliver functional, ranked product search out of the box. Pursuing the native-FTS approach lets us ship search without standing up, integrating, and operating a dedicated search service, avoiding the infrastructure spend, the integration work, and the ongoing on-call burden for as long as our needs stay simple. Be explicit about the trade-off: we get keyword search, not relevance engineering. No facets, no typo tolerance, no merchandising rules. We should name the metrics that tell us the deferral has expired — search-exit rate, zero-result rate, conversion lift from search — and budget the migration to a dedicated engine as a known future cost, so it lands as a planned decision rather than a surprise. One caveat worth surfacing: the specific package is an unmaintained fork of an upstream library, so we would be copying the approach and owning a small amount of SQL rather than taking a vendor dependency.
To engineering: For a Laravel codebase this is a pattern source, not a dependency. Take the to_tsvector/websearch_to_tsquery query construction, ts_rank_cd ordering with setweight field weighting, a generated or trigger-maintained search_vector column, and a GIN index created CONCURRENTLY. Leave the Symfony bundle on the shelf — its DI extension, console command, and Doctrine event subscribers are dead weight here, and we'd be pinned to a 0.1 fork with no upgrade story for code we can own outright.
Sequence it so each step is reversible: (1) benchmark native FTS against the current implementation on production-shaped data — this gates the project; (2) introduce a framework-neutral SearchService interface and route existing search through it with current behavior behind it; (3) add the schema and backfill in batches, maintaining vectors via trigger or generated column rather than model events, since bulk and queue writes skip those; (4) shadow-run and diff top-N results against the incumbent; (5) cut over per surface — search page, typeahead, admin — behind a feature flag; (6) keep the old path in reserve for a cycle. Encapsulating behind the interface means swapping to Meilisearch or Elasticsearch later is a contained change rather than a rewrite. Instrument two things from day one: a reconciliation job counting rows whose stored vector disagrees with a recomputed one, and a fixed golden query set asserted in CI to catch silent relevance regressions when dictionary or unaccent configuration changes.
How can I help you explore Laravel packages today?