You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore!: reset version history and ship clean v1.0.0
Collapse pre-1.0 changelog entries, drop ApexScout namespace history
and post-1.0 upgrade notes, soften positioning vs Meilisearch/Algolia/
Typesense, add FAQ + "Should I use this?" sections, scope ensureSearchable
cache + lookup by database/schema/table, drop minimum-stability=dev,
add ext-pdo_pgsql requirement.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Thanks for considering a contribution. This document is short and concrete.
14
14
composer test# pest
15
15
```
16
16
17
-
5. Update `CHANGELOG.md`under the `[Unreleased]` section using [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) categories (`Added` / `Changed` / `Fixed` / `Deprecated` / `Removed` / `Security`).
17
+
5. Update `CHANGELOG.md`with an entry describing the change, using [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) categories (`Added` / `Changed` / `Fixed` / `Deprecated` / `Removed` / `Security`). Maintainers cut and tag releases.
Postgres-native search engine for [Laravel Scout](https://laravel.com/docs/scout). Removes the need for Meilisearch / Algolia / Typesense for the common 80% case when you already run Postgres — no extra service, no sync queue, no separate index. See [Comparison](#comparison) and [Limitations](#limitations) for the cases it does **not** cover.
9
+
A Postgres-native Laravel Scout engine for apps that want search without running Meilisearch, Algolia, or Typesense. Targets the common 80% case when you already run Postgres — no extra service, no sync queue, no separate index. See [Should I use this?](#should-i-use-this), [Comparison](#comparison), and [Limitations](#limitations) for the cases it does **not** cover.
10
10
11
11
Works on any Postgres 14+ where `pg_trgm` and `unaccent` are available — managed (Neon, Laravel Cloud, RDS, Supabase, DigitalOcean) or self-managed.
12
12
13
13
## Why
14
14
15
15
Most Laravel apps already have Postgres. Adding Meilisearch or Typesense means another service to deploy, secure, monitor, scale, and keep in sync. For mid-sized catalogs (millions of rows, sub-100ms p95) Postgres FTS combined with `pg_trgm` similarity is good enough, cheaper, and stays consistent with your source of truth — there is no separate index to drift out of sync.
16
16
17
+
## Should I use this?
18
+
19
+
**Use it when:**
20
+
21
+
- You already run Postgres and don't want to operate a second search service.
22
+
- Your corpus is in the hundreds-of-thousands to low-millions of rows.
23
+
- You need typo tolerance, prefix / as-you-type matching, and accent-insensitive search.
24
+
- You're happy with raw-SQL faceting and aggregation (Scout returns model IDs; you join from there).
25
+
- A single `regconfig` (text search configuration) per table is enough — usually `simple_unaccent` or one language per migration.
26
+
27
+
**Use a dedicated engine instead when:**
28
+
29
+
- You need first-class faceting, highlighting, or synonym dictionaries.
30
+
- You need per-document language switching (English row, Portuguese row, Japanese row in the same table).
31
+
- Your corpus is hundreds of millions of rows.
32
+
- You need geo-search and don't want to add PostGIS.
33
+
- You need learning-to-rank, vector hybrid search, or relevance feedback features.
34
+
17
35
## Comparison
18
36
19
37
Honest side-by-side. Use this to decide whether `scout-postgres` is the right tool, or whether you actually need a dedicated engine.
So in the worst case adaptive runs two queries; in the common case it runs
268
286
one. `query_strategy=hybrid` forces single-pass FTS+trigram for every
269
-
query (the pre-1.0 behaviour). `query_strategy=fts_only` never runs the
270
-
trigram pass — fastest but loses typo recovery.
287
+
query. `query_strategy=fts_only` never runs the trigram pass — fastest but
288
+
loses typo recovery.
271
289
272
290
### Short-prefix fast path
273
291
@@ -329,8 +347,8 @@ that matter:
329
347
are available as opt-in tunings; their thresholds have different
330
348
semantics so re-tune the threshold when switching.
331
349
332
-
See [`benchmarks/`](benchmarks/) for measured numbers on a 50,150-row
333
-
corpus, including before/after deltas vs `1.0.0`.
350
+
See [`benchmarks/`](benchmarks/) for measured numbers on 50k and 500k
351
+
row corpora, with full methodology and the artisan harness.
334
352
335
353
## Production notes
336
354
@@ -382,8 +400,7 @@ Book::search('foo')
382
400
->paginate(20);
383
401
```
384
402
385
-
Or globally via `SCOUT_POSTGRES_TOTAL_COUNT=true` to restore the pre-1.0
386
-
default for every search.
403
+
Or globally via `SCOUT_POSTGRES_TOTAL_COUNT=true` for every search.
387
404
388
405
When `total_count` is enabled the window aggregate forces Postgres to
389
406
materialise every matching row before applying `LIMIT`, so latency scales
@@ -394,8 +411,6 @@ million-row corpora.
394
411
395
412
The package is **stable** as of `v1.0.0`. The public API — the `postgresSearchable()` migration macro, the `dropPostgresSearchable()` macro, the `PostgresSearchable` contract, the `pgsql` Scout engine driver name, and the keys in `config/scout-postgres.php` — is committed across the entire `1.x` line. Breaking changes will land on a `2.0.0` release tag and will be documented in `CHANGELOG.md` with a migration note.
396
413
397
-
The legacy `ApexScout\ScoutPostgres\` namespace was dropped in `1.1.0` — migrate any remaining imports to `ScoutPostgres\…`.
398
-
399
414
## Limitations
400
415
401
416
By design, this package targets the 80% case. The following are **not** in scope for the `1.x` line:
@@ -421,32 +436,34 @@ The model's connection driver is not `pgsql`. Check `config/database.php` and th
421
436
**`text search configuration "simple_unaccent" does not exist`**
422
437
The package migration did not run. Run `php artisan migrate`. The package's own migration is loaded automatically — no `--path` flag is needed.
423
438
424
-
## Upgrading from earlier 1.x releases
439
+
## FAQ
425
440
426
-
The post-1.0.0 work flips several behavioural defaults to make the
427
-
out-of-the-box experience faster on common Scout-driver workloads. Each is
428
-
backed by a config key so the old behaviour can be restored without code
429
-
changes — useful when an existing deployment depends on the previous
430
-
ranking or pagination semantics.
441
+
**Do I need to run `php artisan scout:import`?**
442
+
No. The `search_vector` and `search_text` columns are `STORED GENERATED`,
443
+
so Postgres recomputes them automatically on every `INSERT` / `UPDATE`.
0 commit comments