v2.0.0 Release
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
- Release candidate/2024 07 by @rohanshah18 in #142
- Update generated code for fixing Collection Model's dimension error by @rohanshah18 in #144
- Prepare for v2.0.0 release and update README + add migration guide by @rohanshah18 in #145
- Clean up README by @rohanshah18 in #146
Full Changelog: v1.2.2...v2.0.0