Parameters
| Parameter | Type | Description |
|---|---|---|
query_vectors | Array2D<float> | Query vectors to search. |
query_params | QueryParams | Parameters for querying, such as top_k, n_probes, and rerank_mult (default 50). Pass cyborg::QueryParams{} for defaults. |
key | KeyContext | Key context for the operation. A bare 32-byte index key (the index_key) implicitly converts to a KeyContext. For an RBAC user, pass cyborg::KeyContext{user_kek, user_id} (read permission required). |
Both
query_params and key are required. There are no longer default values for these arguments.Returns
QueryResults: Results top_k containing decrypted nearest neighbors IDs and distances.
Exceptions
std::invalid_argument
std::invalid_argument
- Throws if the query vectors have incompatible dimensions with the index.
- Throws if the index was not created or loaded yet.
std::runtime_error
std::runtime_error
- Throws if the query could not be executed.
- Throws if the supplied key context lacks read permission.