Manage serverless indexes
This page shows you how to manage your existing serverless indexes.
For guidance on pod-based indexes, see Manage pod-based indexes.
List indexes
Use the list_indexes
operation to get a complete description of all indexes in a project:
The response will look like this:
With the Python SDK, you can use the .names()
helper function to iterate over the index names in the list_indexes()
response, for example:
Describe an index
Use the describe_index
endpoint to get a complete description of a specific index:
The response will look like this:
Do not target an index by name in production.
When you target an index by name for data operations such as upsert
and query
, the SDK gets the unique DNS host for the index using the describe_index
operation. This is convenient for testing but should be avoided in production because describe_index
uses a different API than data operations and therefore adds an additional network call and point of failure. Instead, you should get an index host once and cache it for reuse or specify the host directly.
Delete an index
Use the delete_index
operation to delete an index and all of its associated resources.
If deletion protection is enabled on an index, requests to delete it will fail and return a 403 - FORBIDDEN
status with the following error:
Before you can delete such an index, you must first disable deletion protection.
You can delete an index using the Pinecone console. For the index you want to delete, click the three dots to the right of the index name, then click Delete.
Associate an embedding model
Integrated inference lets you upsert and search without extra steps for embedding data and reranking results.
To configure an existing serverless index for an embedding model, use the configure_index
operation as follows:
- Set
embed.model
to one of Pinecone’s hosted embedding models. - Set
embed.field_map
to the name of the field in your source document that contains the data for embedding.
The vector_type
, metric
, and dimension
of the index must be supported by the specified embedding model.
Configure deletion protection
This feature requires Pinecone API version 2024-07
, Python SDK v5.0.0, Node.js SDK v3.0.0, Java SDK v2.0.0, or Go SDK v1.0.0 or later.
Enable deletion protection
You can prevent an index and its data from accidental deleting when creating a new index or after its been created. In both cases, you set the deletion_protection
parameter to enabled
.
To enable deletion protection when creating a new index:
To enable deletion protection when configuring an existing index:
When deletion protection is enabled on an index, requests to delete the index fail and return a 403 - FORBIDDEN
status with the following error:
Disable deletion protection
Before you can delete an index with deletion protection enabled, you must first disable deletion protection as follows:
Configure index tags
Tags are key-value pairs that you can use to categorize and identify the index.
This feature requires Pinecone API version 2024-10
or later.
Add tags
To add tags to an index, use the tags
parameter when creating a new index or when configuring an existing index.
To add tags when creating a new index:
You can add tags during index creation using the Pinecone console.
To add or update tags when configuring an existing index:
You can add or update tags when configuring an existing index using the Pinecone console. Find the index to edit and click the ellipsis (..) menu > Add tags.
View tags
To view the tags of an index, list all indexes in a project or get information about a specific index.
For example, to list all indexes in a project:
The response includes the tags of each index:
You can view index tags using the Pinecone console.
Remove tags
To remove a tag from an index, configure the index and use the tags
parameter to send the tag key with an empty value (""
).
The following example removes the example: tag
tag from example-index
:
You can remove tags from an index using the Pinecone console. Find the index to edit and click the ellipsis (..) menu > __ tags.
Was this page helpful?