I am now evaluating a mechanism that using index for an embedding space, and uses namespace for each specific embedding version, per our logic we only need to keep the last 7 days’ versions, so I am wondering if there is any API to delete the old versions, aka. older namespaces.
I checked the APIs it seems that I can only delete embeddings by Ids or delete the whole index and deleting a namespace is not yet supported. Delete (pinecone.io)
The API of delete supports deleting a whole namespace. It is done by using delete_all flag.
e.g. calling index.delete(delete_all=True, namespace="example") will delete all vectors inside “example” namespace and only them.
Yes, the delete call is async.
You can check the completion of namespace deletion by polling the describe_index_stats API call until its response doesn’t contain the deleted namespace.