Vector search
For engineers
Storing and querying embeddings in pgvector or a dedicated vector database, with the right index, distance metric and filters
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Which pgvector operator returns cosine distance?
Check yourself · 2 of 5
What does recall mean for an approximate vector index?
Check yourself · 3 of 5
A filtered vector query with LIMIT 10 returns only 2 rows, though 5,000 rows match the filter. What is the most likely cause?
Check yourself · 4 of 5
Which store is an in-process library rather than a server?
Check yourself · 5 of 5
For vectors that all have length 1, which statement is true?
Topics
- Vector search inside PostgreSQL with pgvector5 min read · The vector column type, distance operators, nearest-neighbour queries and keeping vectors next to the rows they describe
- Approximate indexes: HNSW and IVF6 min read · Exact versus approximate search, HNSW and IVFFlat parameters, build time, memory, and the recall-speed dial at query time
- Filtering by metadata during vector search6 min read · Pre-filtering, post-filtering and filtered HNSW, and why a selective filter can silently return too few results
- Picking a vector store for the job6 min read · pgvector, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and in-process libraries such as FAISS compared on scale, ops and filtering
- Distance metrics and normalization5 min read · Cosine, dot product and Euclidean distance, normalized vectors and what goes wrong when the metric does not match the model
Start here
- pgvector: open-source vector similarity search for Postgres (opens in a new tab)ToolFree
The README lists the column type, operators, operator classes, HNSW and IVFFlat options and their defaults.
- Efficient and robust approximate nearest neighbor search using HNSW graphs (opens in a new tab)PaperFree
The original HNSW paper: how the layered graph works and why M and the search width trade recall for speed.
- Filtering (Qdrant documentation) (opens in a new tab)DocsFree
Shows how a dedicated vector database applies payload filters inside graph search.
Helps to know first
110 questions · last verified 2026-12