from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_list = pc.list_indexes()
print(index_list)
{
"indexes": [
{
"name": "docs-example2",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example2-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "production",
"example": "tag2"
},
"vector_type": "dense"
},
{
"name": "docs-example1",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example1-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "development",
"example": "tag"
},
"vector_type": "dense"
}
]
}
This operation returns a list of all indexes in a project.
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_list = pc.list_indexes()
print(index_list)
{
"indexes": [
{
"name": "docs-example2",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example2-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "production",
"example": "tag2"
},
"vector_type": "dense"
},
{
"name": "docs-example1",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example1-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "development",
"example": "tag"
},
"vector_type": "dense"
}
]
}
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
index_list = pc.list_indexes()
print(index_list)
{
"indexes": [
{
"name": "docs-example2",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example2-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "production",
"example": "tag2"
},
"vector_type": "dense"
},
{
"name": "docs-example1",
"metric": "cosine",
"dimension": 1536,
"status": {
"ready": true,
"state": "Ready"
},
"host": "docs-example1-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec": {
"serverless": {
"region": "us-east-1",
"cloud": "aws"
}
},
"deletion_protection": "disabled",
"tags": {
"environment": "development",
"example": "tag"
},
"vector_type": "dense"
}
]
}
This operation returns a list of all the indexes that you have previously created, and which are associated with the given project
The list of indexes that exist in the project.
Show child attributes
The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
1 - 45"example-index"
The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the vector_type is dense, the metric defaults to 'cosine'.
cosine, euclidean, dotproduct The URL address where the index is hosted.
"semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io"
Show child attributes
Configuration needed to deploy a pod-based index.
Show child attributes
The environment where the index is hosted.
"us-east1-gcp"
The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.
The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change.
x >= 1The number of shards. Shards split your data across multiple pods so you can fit more data into an index.
x >= 1The number of pods to be used in the index. This should be equal to shards x replicas.'
x >= 11
Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when metadata_config is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes.
Show child attributes
By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed.
{
"indexed": ["genre", "title", "imdb_rating"]
}The name of the collection to be used as the source for the index.
"movie-embeddings"
{
"environment": "us-east1-gcp",
"metadata_config": {
"indexed": ["genre", "title", "imdb_rating"]
},
"pod_type": "p1.x1",
"pods": 1,
"replicas": 1,
"shards": 1,
"source_collection": "movie-embeddings"
}Configuration needed to deploy a serverless index.
{
"pod": {
"environment": "us-east-1-aws",
"metadata_config": {
"indexed": ["genre", "title", "imdb_rating"]
},
"pod_type": "p1.x1",
"pods": 1,
"replicas": 1,
"shards": 1
}
}The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
The dimensions of the vectors to be inserted in the index.
1 <= x <= 200001536
Whether deletion protection is enabled/disabled for the index.
disabled, enabled Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '', or '-'. Values must be alphanumeric, ';', '@', '', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
Show child attributes
{ "tag0": "val0", "tag1": "val1" }The embedding model and document fields mapped to embedding inputs.
Show child attributes
The name of the embedding model used to create the index.
"multilingual-e5-large"
The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set.
cosine, euclidean, dotproduct The dimensions of the vectors to be inserted in the index.
1 <= x <= 200001536
The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
Identifies the name of the text field from your document model that is embedded.
{ "text": "your-text-field" }The read parameters for the embedding model.
The write parameters for the embedding model.
{
"field_map": { "text": "your-text-field" },
"metric": "cosine",
"model": "multilingual-e5-large",
"read_parameters": { "input_type": "query", "truncate": "NONE" },
"write_parameters": { "input_type": "passage" }
}Was this page helpful?