Search by vector
Query a Telys collection with a precomputed query vector using search(), and read back ids, scores, optional metadata, and an explain trace.
search is the raw-vector query path: pass a query vector of exactly dim values and Telys returns the nearest records. Use it when you already have query embeddings, or on a vectors-only collection. To query with a string, see Search by text.
Signature
Collection.search(
vector,
top_k=10,
where=None,
explain=False,
target_recall=None,
with_metadata=False,
) -> dictvector
1-D float32 (length dim)
—
The query vector. Its length must equal the collection's dim.
top_k
int
10
Maximum number of results to return.
explain
bool
False
Add an "explain" trace describing how the query ran.
target_recall
float | None
None
Per-query recall/latency hint for the planner (e.g. 0.95).
with_metadata
bool
False
Add a "metadata" list aligned with the returned ids.
The result is always {"ids": [...], "scores": [...]}, plus "explain" when explain=True and "metadata" when with_metadata=True. ids are ordered best-match first; scores[i] matches ids[i].
Basic query
Return metadata and an explain trace
Filter and tune per query
Use where to constrain to a partition or filter column, and target_recall to nudge the recall/latency tradeoff:
Expected result
ids and scores are parallel lists ordered best-match first. with_metadata=True adds a metadata list in the same order, so result["ids"][0] and result["metadata"][0] describe the same record:
Next steps
Search by text — let Telys embed a string query for you.
Filter results — scope a search with
Eqor a single-key dict.Search internals (IVF) — what
target_recallactually controls.
Last updated
Was this helpful?