Managing Collections

1. Understanding Collection Purpose

UseDescription
BackupSnapshot before risky changes
MigrationSwitch pod type / region
CloneSpin up dev/test from prod data
RestoreRoll back from snapshot
Note: Collections are a pod-based feature. Serverless uses built-in backups.

2. Creating Collection from Index

Example: Create Collection

pc.create_collection(name="docs-2026-05", source="docs-pod")
ParamDescription
nameCollection name (unique per project)
sourceSource pod-based index name

3. Listing All Collections

Example: List

for c in pc.list_collections():
    print(c["name"], c["status"])

4. Describing Collection

Example: Describe

info = pc.describe_collection("docs-2026-05")
print(info["size"], info["status"], info["vector_count"])
FieldDescription
sizeBytes consumed
vector_countTotal vectors snapshotted
statusInitializing / Ready

5. Creating Index from Collection

Example: Restore

pc.create_index(
    name="docs-restored",
    dimension=1536,
    metric="cosine",
    spec=PodSpec(
        environment="us-east-1-aws",
        pod_type="p1.x1",
        source_collection="docs-2026-05",
    ),
)

6. Deleting Collection

Example: Delete

pc.delete_collection("docs-2026-05")
Warning: Deletion is permanent; cannot recover snapshot.

7. Managing Collection Size Limits

LimitValue
Max per project100 collections (Standard)
Max sizePlan-dependent
Storage cost~$0.024/GB-month (varies)

8. Handling Collection Creation Time

Vector CountApprox Time
100K~1–2 min
1M~5–10 min
10M~30–60 min

9. Verifying Collection Status

Example: Wait for Ready

import time
while pc.describe_collection("docs-2026-05")["status"] != "Ready":
    time.sleep(5)

10. Using Collections for Testing Environments

Dev-from-Prod Workflow

  1. Create collection from prod index.
  2. Wait for Ready status.
  3. Create dev index with source_collection.
  4. Use smaller pod type to save cost.
  5. Delete dev index + collection when done.
BenefitDetail
Realistic dataFull prod distribution
IsolatedNo risk to prod traffic