Skip to main content
Searches for nearest neighbors in the encrypted index using vector similarity search. Supports single vector queries, batch queries, and semantic search with text content.

Parameters

When np.ndarray is passed as query_vectors, queries are automatically sent in an optimized binary format for better performance.

Returns

For single queries: List[Dict] - A list of result dictionaries. For batch queries: List[List[Dict]] - A list of result lists, one for each query vector.

Result Format

Single Query Result:
Batch Query Result:

Exceptions

  • Throws if the API request fails due to network connectivity issues.
  • Throws if authentication fails (invalid API key).
  • Throws if the encryption key is invalid for the specified index.
  • Throws if there are internal server errors during the search.
  • Throws if query vectors or query contents is not provided.
  • Throws if vector dimensions don’t match the index configuration.
  • Throws if parameter values are out of valid ranges.
  • Throws if the include parameter contains invalid field names.

Example Usage

Single Vector Query

Batch vector queries:

Semantic Search with Text

Advanced filtering and options: