Query
Warning: The legacy version of the API, which requires regional URLs for control plane operations, is deprecated as of April 15, 2024 and will be removed in a future, to be announced, release. For more information, see Migrate to the new API.
The Query
operation searches a namespace, using a query vector.
It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
Authorizations
An API Key is required to call Pinecone APIs. Get yours at https://app.pinecone.io/.
Body
The <a href='https://docs.pinecone.io/docs/namespaces'>namespace</a> to query.
The number of results to return for each query.
The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
Indicates whether vector values are included in the response.
Indicates whether metadata is included in the response as well as the ids.
DEPRECATED. The query vectors. Each query()
request can contain only one of the parameters queries
, vector
, or id
.
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
.
Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be the same length.
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
.
Response
The matches for the vectors.
The <a href='https://docs.pinecone.io/docs/namespaces'>namespace</a> for the vectors.