What a comparison needs
A comparison needs a versioned corpus, fixed queries and relevance labels, engine versions, index configuration and recorded runs. Filters, concurrency and updates belong in the workload. This article does not publish a supported comparative benchmark of pgvector, Qdrant, Pinecone and Weaviate. The local projects at the end answer narrower, documented questions.
HNSW vs IVF: When Each Wins
pgvector 0.8 supports both HNSW and IVF-Flat indexes. The choice matters more than most people realize.
HNSW (Hierarchical Navigable Small World)
CREATE INDEX ON documents
USING hnsw (embedding vector_cosine_ops)
WITH (m = 16, ef_construction = 256);
-- At query time
SET hnsw.ef_search = 100;
Pros: Fast queries, high recall, no training step Tradeoff: Measure index memory and build time on the target corpus.
IVF-Flat (Inverted File with Flat quantization)
CREATE INDEX ON documents
USING ivfflat (embedding vector_cosine_ops)
WITH (lists = 1500);
-- At query time
SET ivfflat.probes = 40;
Evaluation: Compare recall against exact search at the same query budget. Build time, memory, filter selectivity and updates can change the result; these example settings are not measured recommendations.
Quantization: The Memory vs Quality Tradeoff
Quantization changes the storage representation; retrieval quality and total process memory require separate measurements.
pgvector: halfvec (float16)
-- pgvector 0.8 supports halfvec natively
ALTER TABLE documents
ALTER COLUMN embedding TYPE halfvec(1536);
-- Index works the same
CREATE INDEX ON documents
USING hnsw (embedding halfvec_cosine_ops);
Float16 uses fewer bytes per component than float32. Measure recall and total resource use before changing a stored representation.
Qdrant: Binary Quantization with Rescoring
{
"collection_name": "documents",
"vectors": {
"size": 1536,
"distance": "Cosine",
"quantization_config": {
"binary": {
"always_ram": true
}
}
},
"quantization_config": {
"binary": {
"always_ram": true
}
}
}
Rescoring compares retrieved candidates with their original vectors. Evaluate candidate count, storage for the original vectors, total memory and recall together; compression alone does not establish answer quality.
The Hybrid Search Question
Real RAG pipelines don't just do vector search. You need keyword matching, metadata filtering, and often both combined. Here's where the architectures diverge sharply.
pgvector: The Unfair Advantage
-- Hybrid search: vector similarity + full-text search + metadata filter
WITH vector_results AS (
SELECT id, content,
1 - (embedding <=> $1::vector) AS vector_score
FROM documents
WHERE category = $2
ORDER BY embedding <=> $1::vector
LIMIT 20
),
text_results AS (
SELECT id, content,
ts_rank(search_vector, plainto_tsquery($3)) AS text_score
FROM documents
WHERE category = $2
AND search_vector @@ plainto_tsquery($3)
LIMIT 20
)
SELECT COALESCE(v.id, t.id) AS id,
COALESCE(v.content, t.content) AS content,
COALESCE(v.vector_score, 0) * 0.7 +
COALESCE(t.text_score, 0) * 0.3 AS combined_score
FROM vector_results v
FULL OUTER JOIN text_results t ON v.id = t.id
ORDER BY combined_score DESC
LIMIT 10;
This is pgvector's killer feature: hybrid search in a single query, with the full power of PostgreSQL's query planner. No external orchestration, no separate keyword index, no result fusion in application code.
Qdrant: Payload Filtering
from qdrant_client import QdrantClient, models
results = client.search(
collection_name="documents",
query_vector=query_embedding,
query_filter=models.Filter(
must=[
models.FieldCondition(
key="category",
match=models.MatchValue(value="billing")
)
]
),
limit=10,
search_params=models.SearchParams(
hnsw_ef=100,
exact=False
)
)
Qdrant handles metadata filtering well (integrated into the HNSW search), but keyword search requires a separate full-text index and manual fusion. For simple filter + vector search, it's excellent. For true hybrid search, you're building the fusion logic yourself.
Weaviate: Built-in Hybrid
{
Get {
Document(
hybrid: {
query: "SSO Azure AD configuration"
alpha: 0.7
fusionType: relativeScoreFusion
}
where: {
path: ["category"]
operator: Equal
valueText: "authentication"
}
limit: 10
) {
content
_additional {
score
}
}
}
}
Weaviate has the best hybrid search story among the dedicated vector databases. The alpha parameter controls the vector vs keyword weight, and relativeScoreFusion handles the score normalization. It's not quite as flexible as raw SQL, but it's production-ready out of the box.
Choosing a deployment
Record the operating constraints before selecting an engine: existing relational data, required filtering and hybrid search, update frequency, recovery requirements and the team responsible for maintenance. Compare current provider quotes against the same workload, including storage, reads, writes, replicas and network costs.
Use a held-out query set to decide whether a change improves retrieval. A latency result from another corpus or a different deployment is not evidence for the target application.
Reproducible implementation: portability and filters
Vector Search Portability compares two real local engines, hnswlib and sqlite-vec, using 5,000 frozen vectors, identical filters and 500 updates. Exhaustive search supplies the reference. Published evidence includes IDs, distances, recall, result loss, concurrent load and resource measurements.
Both engines reached native recall 1.0 on that fixture. Applying the selective filter after retrieving 40 global neighbors lost 97.25% of available results despite 14 eligible vectors. Adapter details mattered too: four clients degraded HNSW with its Python predicate. The project page retains both original and confirmation evidence. This experiment measures local geometry and adapters; it is not a pgvector, Qdrant or Pinecone benchmark or a semantic-relevance evaluation.
Reproducible implementation: retrieval across languages
Bilingual Retrieval Evals compares BM25, accent folding and multilingual MiniLM on 32 original documents. It separates EN to EN, EN to ES, ES to EN and ES to ES, along with entities, cultural expressions and paired accent contrasts.
Across 32 original evaluation queries, MiniLM reached 1.000 Recall@3 and 0.977 NDCG@3; BM25 reached 0.719 on both. Perfect recall still concealed ranking errors: a distractor outranked the relevant document for a cultural query. The project links full rankings, vectors, family intervals and failure cases. Labels are author-written and still await independent bilingual review.
Editorial review, 2026-11-10: Removed measurements and experience claims that lacked linked supporting evidence. The linked project reports retain their stated scope; this article is not a production case study.