PineconeVectorService
Central service to access all Pinecone vector operations/endpoints as defined at the API ref. page
The following services are supported:
- describeIndexStats
- query - by vector or by id (queryById)
- delete - by filter or ids, or delete all
- fetch
- update
- upsert
- listVectorIDs
Attributes
- Since:
Apr 2023
- Graph
- Supertypes
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- PineconeServiceConsts
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Value members
Abstract methods
Closes the underlying ws client, and releases all its resources.
Closes the underlying ws client, and releases all its resources.
Attributes
The Delete operation deletes vectors, by id, from a single namespace.
The Delete operation deletes vectors, by id, from a single namespace.
Attributes
- ids
Vectors to delete.
- namespace
The namespace to delete vectors from, if applicable.
- Returns:
N/A
- See also:
The Delete operation deletes vectors, by the metadata filter, from a single namespace.
The Delete operation deletes vectors, by the metadata filter, from a single namespace.
Attributes
- filter
The metadata filter here will be used to select the vectors to delete. See https://www.pinecone.io/docs/metadata-filtering/.
- See also:
The Delete operation deletes ALL the vectors from a single namespace.
The Delete operation deletes ALL the vectors from a single namespace.
Attributes
- See also:
The DescribeIndexStats operation returns statistics about the index's contents, including the vector count per namespace and the number of dimensions.
The DescribeIndexStats operation returns statistics about the index's contents, including the vector count per namespace and the number of dimensions.
Attributes
- Returns:
IndexStats
- See also:
The Fetch operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata.
The Fetch operation looks up and returns vectors, by ID, from a single namespace. The returned vectors include the vector data and/or metadata.
Attributes
- id
The vector IDs to fetch. Does not accept values containing spaces.
- See also:
The list operation lists the IDs of vectors in a single namespace. An optional prefix can be passed to limit the results to IDs with a common prefix.
The list operation lists the IDs of vectors in a single namespace. An optional prefix can be passed to limit the results to IDs with a common prefix.
Note: This operation seems to be working only for serverless indexes.
It returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the limit parameter is set, list returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a pagination_token that you can use to get the next batch of IDs. When the response does not includes a pagination_token, there are no more IDs to return.
Attributes
- Returns:
List of vector IDs wrapped in a ListVectorIdsResponse
- See also:
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.
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.
Attributes
- namespace
The namespace to query.
- vector
The query vector. This should be the same length as the dimension of the index being queried.
- Returns:
model or None if not found
- See also:
The Query operation searches a namespace, using an unique id of the vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
The Query operation searches a namespace, using an unique id of the vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
Attributes
- id
The unique ID of the vector to be used as a query vector.
- Returns:
QueryResult
- See also:
The Update operation updates vector in a namespace. If a value is included, it will overwrite the previous value. If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value.
The Update operation updates vector in a namespace. If a value is included, it will overwrite the previous value. If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value.
Attributes
- id
Vector's unique id.
- namespace
The namespace containing the vector to update.
- setMetaData
Metadata to set for the vector.
- sparseValues
Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be the same length.
- values
Vector data.
- Returns:
N/A
- See also:
The Upsert operation writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value.
The Upsert operation writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value.
Attributes
- namespace
This is the namespace name where you upsert vectors.
- vectors
An array containing the vectors to upsert. Recommended batch limit is 100 vectors.
- Returns:
The number of vectors upserted.
- See also:
Inherited fields
Attributes
- Inherited from:
- PineconeServiceConsts
Attributes
- Inherited from:
- PineconeServiceConsts