Release 0.3.0
Changelog
We have introduced the following two index operations:
- Creating an index is now possible using the required fields
index_name
anddimension
, along with optional fields such asmetric
,pods
,replicas
,pod_type
,metadata_config
, andsource_collection
. - Additionally, you can now delete an index using the
index_name
parameter.
Examples:
- Create Index:
// The following example creates an index without a metadata configuration. By default, Pinecone indexes all metadata.
PineconeClientConfig configuration = new PineconeClientConfig()
.withApiKey("YOUR_API_KEY")
.withEnvironment("us-east1-gcp");
PineconeIndexOperationClient pineconeIndexOperationClient = new PineconeIndexOperationClient(configuration);
CreateIndexRequest createIndexRequest = new CreateIndexRequest()
.withIndexName("example-index")
.withDimension(128);
pineconeIndexOperationClient.createIndex(createIndexRequest);
// The following example creates an index that only indexes the "color" metadata field.
IndexMetadataConfig metadataConfig = new IndexMetadataConfig();
metadataConfig.addIndexedItem("color");
CreateIndexRequest createIndexRequest2 = new CreateIndexRequest()
.withIndexName("example-index-2")
.withDimension(1024)
.withMetadataConfig(metadataConfig);
pineconeIndexOperationClient.createIndex(createIndexRequest2);
- Delete Index:
// The following example deletes an index
PineconeClientConfig configuration = new PineconeClientConfig()
.withApiKey("YOUR_API_KEY")
.withEnvironment("us-east1-gcp");
PineconeIndexOperationClient pineconeIndexOperationClient = new PineconeIndexOperationClient(configuration);
pineconeIndexOperationClient.deleteIndex("example-index");