Primary search
V3 full-text search remains the preferred retrieval strategy.
V4 keeps V3 indexed full-text search as the primary retrieval path, then activates PostgreSQL trigram similarity when linguistic search cannot recover useful results.
V4 introduces typo tolerance without replacing full-text search. PostgreSQL first attempts the normal FTS path, then falls back to trigram similarity when needed.
V3 full-text search remains the preferred retrieval strategy.
Fuzzy retrieval activates only when the normal search path cannot satisfy the query.
Similar character sequences help recover misspelled brands, categories and names.
Something went wrong.
V4 exposes whether PostgreSQL returned normal full-text results or activated fuzzy recovery.
The retrieval mode used for this request.
Whether trigram similarity was required.
PostgreSQL FTS or PostgreSQL pg_trgm.
Trigram matching compares overlapping three-character sequences rather than linguistic lexemes.
key
eyb
ybo
bor
ord
key
eyb
ybo
boa
oar
ard
similarity(name, query)
Strong fuzzy signal for product-name misspellings.
similarity(brand, query)
Useful for inputs such as logtech.
similarity(category, query)
Provides another recovery signal for categorical search terms.
MAX field similarity
The strongest fuzzy field becomes the product's current fuzzy score.
Human-readable interpretation of
EXPLAIN ANALYZE and
BUFFERS.
Run a search to inspect PostgreSQL's selected execution strategy.
PostgreSQL query planning duration.
PostgreSQL server-side execution.
Rows discarded by filtering conditions.
Blocks already present in shared buffers.
Blocks read into PostgreSQL buffers.
Startup timing for the selected node.
Total execution time for that node.
Search architecture evolution from substring matching to fuzzy recovery.
| Version | Architecture | Results | App time | DB time | Peak memory | Retrieval |
|---|---|---|---|---|---|---|
| V1 | ILIKE substring | — | — | — | — | Sequential scan |
| V2 | Runtime FTS | — | — | — | — | Linguistic scan |
| V3 | Persisted FTS + GIN | — | — | — | — | Indexed FTS |
| V4 | FTS + fuzzy fallback | — | — | — | — | — |
Results ranked by the active retrieval strategy.
Good queries should still use V3's linguistic retrieval and GIN-backed search path.
search_vector @@ tsquery
Fuzzy matching is an alternate recovery path rather than the default search engine.
fallback_used = true
pg_trgm compares overlapping character sequences and can recover many spelling mistakes.
similarity()
PostgreSQL's percent operator filters candidates based on the configured trigram similarity threshold.
field % query
Understands lexemes, stemming, stop words, Boolean query structure and field weighting.
Understands that two strings share many character sequences, making it useful for spelling recovery.
V4 combines them instead of forcing one algorithm to solve both linguistic relevance and typo tolerance.