Full-Text tsvector Indexing
tsvector is PostgreSQL’s native text search type that parses, stems, and indexes words for lightning-fast lexical keyword searching.
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.
Related Technical Concepts
Hybrid Search (Dense + Sparse Retrieval)
Hybrid Search merges dense vector search with sparse keyword matching to deliver superior accuracy across both conceptual and exact-term queries.
Trigram Fuzzy Matching (pg_trgm)
Trigram matching breaks text into 3-character slices, allowing search engines to match queries even when visitors make typos or misspellings.
Reciprocal Rank Fusion (RRF)
Reciprocal Rank Fusion (RRF) is an algorithmic scoring method that merges and ranks search results from multiple independent retrieval pipelines.
Test it on your own website in under 2 minutes.
Enter your domain to index your pages and preview live answers.