Releases: jonaspauleta/scout-postgres
Releases · jonaspauleta/scout-postgres
v1.0.0 — first stable release
First public stable release of jonaspauleta/scout-postgres — a Postgres-native Laravel Scout engine backed by tsvector FTS + pg_trgm trigram similarity.
Highlights
- Adaptive query strategy (default) — FTS-only first, hybrid FTS + trigram fallback only when recall is insufficient. Cuts trigram cost on common queries while preserving typo recovery.
- Short-prefix fast path — single short tokens skip
websearch_to_tsqueryand the trigram pass; onlyto_tsquery(:prefix:*)runs. Dominant win for as-you-type UIs. total_count=falseby default — dropsCOUNT(*) OVER()so latency scales with page size, not match-set size. Per-query opt-in for paginators that need exact totals.- JIT off per query —
SET LOCAL jit = offremoves 10–30 ms compile cost on FTS queries that complete in single-digit ms. STORED GENERATEDcolumns + GIN indexes —search_vector(tsvector) andsearch_text(capped at 1000 chars by default for bounded trigram cost). No external index, no sync queue.- Per-model overrides via the
PostgresSearchablecontract. - Scout-native API —
search(),where(),whereIn(),whereNotIn(),orderBy(),paginate(),cursor(), soft deletes.
Compatibility
- PHP 8.3 / 8.4 / 8.5
- Laravel 11 / 12 / 13
- Laravel Scout 10 / 11
- Postgres 14+ (CI-tested on Postgres 18) with
pg_trgm≥ 1.6 andunaccent≥ 1.1.
See CHANGELOG.md, README.md, and benchmarks/ for full detail.
Install
composer require jonaspauleta/scout-postgres
php artisan migrateSet SCOUT_DRIVER=pgsql and SCOUT_QUEUE=false in .env.