Skip to main content

Vector Search

Thermocline exposes $vectorSearch in aggregation pipelines. Gateway routes vector/context search pipelines through coordinator orchestration.

Where It Runs

  • Hot tier: storage-engine vector path
  • Cold tier: query-engine vector path
  • Federated: coordinator merges ranked results

Compatibility status is tracked in Compatibility.

Query Shape

db.docs.aggregate([
{
$vectorSearch: {
path: "embedding",
queryVector: [0.1, 0.2, 0.3],
limit: 10,
numCandidates: 100
}
}
])

Gateway supports Atlas-style vector index command aliases:

  • createSearchIndex
  • createSearchIndexes

Source of Truth

  • services/gateway/src/coordinator/request.rs
  • services/gateway/src/proxy/handler/handshake.rs
  • services/coordinator/internal/server/server_vector.go
  • services/storage-engine/src/hnsw/distance/dispatch.rs
  • services/query-engine/src/udf/vector_distance.rs

GPU Path (Optional)

GPU acceleration is optional at storage-engine build time via gpu-accel feature. Without CUDA-enabled build/runtime support, vector execution remains on CPU paths.

See GPU Acceleration.