Vector Search API
Vector search provides semantic similarity retrieval using embeddings.
For zvec-style feature parity tracking, see ZVEC Compatibility (Vector).
Overview
The current implementation uses linear scan (no ANN index yet), but supports rich request shapes:
- Single vector query or multiple vector queries in one request
- Dense vectors and sparse object-form vectors are accepted
- Per-query metric selection:
cosine,dot,l2,l1 - Per-query
weight,threshold, andnormalize - Fusion methods for multi-vector queries:
weighted_sum,max,average,rrf - Filtering via
filter_by(andfilteralias) - Field projection via
output_fieldsand vector inclusion control (include_vector)
Endpoint
POST /collections/{name}/vector_searchGET /collections/{name}/vector_search(query-string mode)POST /collections/{name}/search(alias)GET /collections/{name}/search(alias)
The /collections/{name}/search alias is routed to vector search. Use /collections/{name}/documents/search for lexical document search.
Request Body Shapes
1) Raw vector array (legacy/simple)
[0.1, 0.2, 0.3, 0.4]
2) Single vector object
{
"field_name": "embedding",
"vector": [0.1, 0.2, 0.3, 0.4],
"topk": 10,
"metric_type": "cosine",
"threshold": 0.2,
"normalize": true,
"filter_by": "category:=laptops",
"output_fields": ["id", "title", "category"],
"include_vector": false
}
3) Multi-vector query + fusion
{
"vector_queries": [
{
"field_name": "title_embedding",
"vector": [0.1, 0.2, 0.3],
"weight": 0.7,
"metric_type": "cosine",
"threshold": 0.1
},
{
"field_name": "body_embedding",
"vector": [0.3, 0.4, 0.5],
"weight": 0.3,
"metric_type": "dot"
}
],
"fusion": {
"method": "rrf",
"rrf_k": 60
},
"top_k": 20,
"query_params": {
"ef": 128,
"nprobe": 8,
"is_linear": true,
"is_using_refiner": false
}
}
Optional Keys
topk/top_k/k/limit/per_page: result countquery_params/params: execution hintsef/ef_search/hnsw_ef_searchnprobe/ivf_nprobeis_linear(scan all docs for exact search)is_using_refiner
filter_byorfilter: filter expressionoutput_fields: fields to include indocumentinclude_vector: whenfalse, queried vector fields are excluded fromdocumentradius/max_distance: max vector distance constraintrange_filter/min_distance: min vector distance constraintinclude_distance: include_vector_distancein each hit documenthybrid_alpha+q+query_by: enables hybrid behavior through shared search pipeline
Example Response
{
"hits": [
{
"document": {
"id": "product1",
"title": "Gaming Laptop"
},
"text_match": 0,
"_text_match": 0,
"vector_score": 0.872
}
],
"found": 1,
"out_of": 1,
"page": 1,
"per_page": 10,
"total_pages": 1,
"has_next_page": false,
"has_prev_page": false,
"search_time_ms": 2.4
}
Current Limits
- Linear scan over candidate documents (no ANN index yet)
- Best for small/medium datasets or development workflows
Research Directions
- Performance-focused vector execution: We are actively prototyping quantized/compact vector representations and candidate re-ranking so the vector stage can scale beyond single-digit millions with predictable latency.
- Hybrid planners and telemetry: Selectivity-aware filtering, tiered persistence, and GPU batching will be exposed through new
query_paramshints such as batch size, backend hint, and filter selectivity estimates. - Vector quality monitoring: /status and /stats will eventually expose vector-specific metrics (candidate recall, GPU vs. CPU share) so operators can track the impact of the research changes in production.
For experimental details and benchmarking plans, follow the research note in etc/research/2026-02-26.md.