POST
/
query

Body

application/json

The request for the query operation.

topK
integer
required

The number of results to return for each query.

Required range: 1 < x < 10000
filter
object

The filter to apply. You can use vector metadata to limit your search. See Understanding metadata.

id
string

The unique ID of the vector to be used as a query vector. Each query request can contain only one of the parameters queries, vector, or id.

Maximum length: 512
includeMetadata
boolean
default:
false

Indicates whether metadata is included in the response as well as the ids.

includeValues
boolean
default:
false

Indicates whether vector values are included in the response.

namespace
string

The namespace to query.

queries
object[]
deprecated

DEPRECATED. The query vectors. Each query() request can contain only one of the parameters queries, vector, or id.

sparseVector
object

Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length.

vector
number[]

The query vector. This should be the same length as the dimension of the index being queried. Each query request can contain only one of the parameters id or vector.

Response

200 - application/json

The response for the query operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar.

matches
object[]

The matches for the vectors.

namespace
string

The namespace for the vectors.

results
object[]
deprecated

DEPRECATED. The results of each query. The order is the same as QueryRequest.queries.

usage
object