Valori LogoValori

Search, from basic to advanced

Building up from a plain vector search to filtering, reranking, decay, and multi-collection search.

Search, from basic to advanced

Every level below builds on Vector search — same endpoint, more request fields.

1. Basic vector search

{ "collection": "documents", "query": [0.12, 0.34, ...], "k": 5 }

Returns the k nearest records by the collection's configured distance metric — lower score is closer.

2. Metadata filtering

Add metadata_filter to restrict candidates before ranking:

{ "metadata_filter": { "author": "Alice", "year": { "gte": 2020 } } }

Every key must be present and equal (or satisfy the range operator) in a record's metadata for it to be returned.

3. Text / reranking

Add query_text (and leave rerank at its default of true) to blend vector similarity with BM25 term-frequency scoring — useful when the query is natural-language text, not just an embedding:

{ "query_text": "what optimizer does the training loop use?" }

Set rerank: false to skip this and get pure vector ranking.

4. Recency decay

Add decay_half_life_secs to make older records rank lower without discarding the true distance:

{ "decay_half_life_secs": 86400 }

A record one half-life old has its ranking distance doubled — score in the response still reports the real, undecayed distance.

5. Multi-collection search

Multi-collection search is a different endpoint (POST /v1/search/multi), not a parameter on /v1/search — it fans one query out to several collections and merges the results globally. Every collection you list must share a dimension and metric; reranking and decay-across-corpora aren't supported there, since scores from independent collections aren't directly comparable in the first place.

What isn't covered here

Graph-aware reranking (graph_rerank) is available on Vector search today but needs graph nodes linked to your records to do anything — full Graph documentation lands in a later phase.