Does Pinecone support removing one namespace as a whole?

Hi Pinecone experts,

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)

Hi zhenglaizhang,

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.

EDIT: Fixed a syntax issue :slight_smile:

1 Like

This is great, is the delete call async? How can we check the deletion progress and completion?

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.

1 Like