query_binary() sends query vectors as base64-encoded little-endian float32 instead of JSON arrays, which is faster for large batches. It accepts the same search and hybrid parameters as query(), except query_contents.
Parameters
Returns
- 1-D
query_vectors:List[Dict], one dict per neighbor. - 2-D
query_vectorswith two or more rows:List[List[Dict]], one inner list per query vector. A 2-D array with one row returns a flatList[Dict].
id, plus distance (vector query) or score (hybrid query), and metadata when requested. As with query(), vector and contents are not returned.
Exceptions
cyborgdb.ValidationError
cyborgdb.ValidationError
- Also a
TypeError.query_vectorsis not a NumPy array. query_vectorsis not 1-D or 2-D.- The service rejects the query (HTTP
400/422), for example a wrong vector dimension.
cyborgdb.AuthenticationError
cyborgdb.AuthenticationError
The
index_key or api_key is invalid (HTTP 401).cyborgdb.ServiceError / cyborgdb.TransportError
cyborgdb.ServiceError / cyborgdb.TransportError
The service returns
5xx or can’t be reached.