This page shows you how to create a serverless index, pod-based index, starter index, and an index from a collection.

To learn about the concepts related to indexes, see Indexes.

Create a serverless index

Serverless indexes are in public preview and are available only on AWS in the us-west-2 and us-east-1 regions. Check the current limitations and test thoroughly before using it in production.

To create a serverless index, import the ServerlessSpec class and use the spec parameter to define the cloud and region where the index should be deployed:

Create a pod-based index

To create a pod-based index, import the PodSpec class and use the spec parameter to define the environment where the index should be deployed, the pod type and size to use, and other index characteristics:

For the full list of parameters available to customize an index, see the create_index API reference.

Create a starter index

On the free Starter plan, you get one project and one pod-based starter index with enough resources to support 100,000 vectors. Although the Starter plan does not support all Pinecone features, it’s easy to upgrade when you’re ready.

Starter indexes are hosted in the gcp-starter environment, which is us-central-1 (Iowa) region of the GCP cloud.

To create a free starter index, import the PodSpec class and set environment="gcp-starter" in the spec parameter:

Create an index from a collection

Serverless and starter indexes do not support collections.

To create a pod-based index from a collection, use the create_index operation and provide a source_collection parameter containing the name of the collection from which you wish to create an index. The new index is queryable and writable.

Creating an index from a collection generally takes about 10 minutes. Creating a p2 index from a collection can take several hours when the number of vectors is on the order of 1M.

Example

The following example creates an index named example-index with 128 dimensions from a collection named example-collection.

Was this page helpful?