Skip to contents

Searches an index using a query vector. Returns the most similar vectors.

Usage

vector_query(
  index,
  vector,
  top_k = 5,
  filter = list(),
  name_space = "",
  include_metadata = TRUE,
  include_values = FALSE,
  tidy = TRUE
)

Arguments

index

Name of the index to query

vector

Query vector (numeric vector)

top_k

Number of results to return (default: 5)

filter

Metadata filter (list)

name_space

Namespace to query (default: "")

include_metadata

Whether to include metadata in results (default: TRUE)

include_values

Whether to include vector values in results (default: FALSE)

tidy

Whether to return tidy tibble format (default: TRUE)

Value

List with http response, content (matches), and status_code

Examples

if (FALSE) { # \dontrun{
vector_query("my-index", vector = rep(0.1, 1536), top_k = 10)
} # }