Skip to content

v2.0.0 Release

Compare
Choose a tag to compare
@rohanshah18 rohanshah18 released this 19 Jul 19:52
· 15 commits to main since this release
e5f79bb

Added: API versioning

This updated release of the Pinecone Java SDK depends on API version 2024-07. This v2 SDK release line should continue to receive fixes as long as the 2024-07 API version is in support.

Added: Deletion Protection

Use deletion protection to prevent your most important indexes from accidentally being deleted. This feature is available for both serverless and pod indexes.

To enable this feature for existing pod indexes, use configurePodsindex()

import io.pinecone.clients.Pinecone;
import org.openapitools.control.client.model.DeletionProtection;
...
        
Pinecone pinecone = new Pinecone.Builder("PINECONE_API_KEY").build();
pinecone.configurePodsIndex(indexName, DeletionProtection.ENABLED);

When deletion protection is enabled, calls to deleteIndex() will fail until you first disable the deletion protection.

# To disable deletion protection for pods index
pinecone.configurePodsIndex(indexName, DeletionProtection.DISABLED);

If you want to enable this feature at the time of index creation, createIndex now accepts as an enum argument. The feature is disabled by default.

import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.IndexModel;
import org.openapitools.control.client.model.DeletionProtection;

...

Pinecone pinecone = new Pinecone.Builder("PINECONE_API_KEY").build();
        
String indexName = "example-index";
String similarityMetric = "cosine";
int dimension = 1538;
String cloud = "aws";
String region = "us-west-2";

IndexModel indexModel = pinecone.createServerlessIndex(indexName, similarityMetric, dimension, cloud, region, DeletionProtection.ENABLED);

What's Changed

Full Changelog: v1.2.2...v2.0.0