Search & IndexingTechnical Definition

Full-Text tsvector Indexing

tsvector is PostgreSQL’s native text search type that parses, stems, and indexes words for lightning-fast lexical keyword searching.

Core Technical Definition

A tsvector is a sorted list of distinct normalized lexemes in PostgreSQL, optimized for linguistic stemming and high-speed full-text keyword retrieval.

How tsvector works in practice

PostgreSQL parses raw text into stemmed tokens (e.g., “running” becomes “run”) and removes common stop words (“the”, “is”).

Using a GIN index on tsvector columns, PostgreSQL executes complex boolean queries (`&`, `|`, `!`) in sub-millisecond time across millions of words.

How SiteMind implements tsvector

SiteMind maintains automatic tsvector search columns on all crawled website chunks to execute lexical filtering alongside vector similarity in the same SQL query.

Test our AI tools in your browser (100% Free)

Estimate support savings, token counts, or test prompt injection security guardrails with our zero-cost sandboxes.

Explore Free Tools →