tsvector
A PostgreSQL data type designed specifically for full-text search that splits text into tokens stored in normalized form with positions, supports stemming and relevance ranking, and is typically used together with a GIN index.
Timeline (last 90 days)
tsvector is a data type designed by PostgreSQL specifically for full-text search; it splits text into tokens and stores them normalized by position, thereby supporting stemming and position-related ranking.
Before adding the GIN index and the generated tsvector, searching across 10,000 translations took about 800ms; after adding the index, even when the data volume grew to 100,000 translations, the same query dropped to about 20-40ms.
PostgreSQL has a built-in tsvector for full-text search, along with plugins such as PGSearch that provide BM25-like capabilities.
Postgres's built-in full-text search is based on two data types: tsvector and tsquery.
A tsvector is a lexical vector converted from text after stemming and stop-word filtering, while tsquery is a query expression used for matching.
All Facts (5)
tsvector is a data type designed by PostgreSQL specifically for full-text search; it splits text into tokens and stores them normalized by position, thereby supporting stemming and position-related ranking.
50%UnverifiedBefore adding the GIN index and the generated tsvector, searching across 10,000 translations took about 800ms; after adding the index, even when the data volume grew to 100,000 translations, the same query dropped to about 20-40ms.
50%UnverifiedPostgreSQL has a built-in tsvector for full-text search, along with plugins such as PGSearch that provide BM25-like capabilities.
50%UnverifiedPostgres's built-in full-text search is based on two data types: tsvector and tsquery.
50%UnverifiedA tsvector is a lexical vector converted from text after stemming and stop-word filtering, while tsquery is a query expression used for matching.
50%