Skip to main content
Searches for nearest neighbors in the encrypted index using vector similarity search. Supports both single vector queries and batch queries with multiple vectors, as well as content-based search.

Parameters

Returns

Promise<QueryResponse>: A Promise that resolves to search results. The response format depends on the query type:
  • Single vector query: results is a flat array of QueryResultItem[]
  • Batch query: results is a nested array of QueryResultItem[][] (one array per input vector)

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 neither queryVectors nor queryContents is 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

Basic Single Vector Query

Advanced Single Query with Filters

Batch Vector Query

Complex Metadata Filtering

Response Format

Single Query Response

Batch Query Response