[KongchangAI]
Conceptpg_trgm扩展

pg_trgm

A trigram similarity extension for PostgreSQL that enables fuzzy matching and similarity computation by splitting text into trigrams, commonly used to handle spelling errors and approximate search scenarios.

Timeline (last 90 days)

Oct 14

pg_trgm is an official PostgreSQL extension that splits a string into trigrams made of three consecutive characters, and by comparing the proportion of trigrams shared by two strings it calculates a similarity score between 0 and 1, thereby tolerating typos, missing characters, or reversed word order.

Unverified50%
Oct 14

LectuLibre builds a gin_trgm_ops index on books.title, and at query time filters with similarity(Book.title, q) > 0.3 and sorts by similarity, reducing fuzzy title search from 1.2s to 15ms.

Unverified50%

All Facts (2)

Source Articles