Skip to content

Release 0.3.0

Compare
Choose a tag to compare
@rohanshah18 rohanshah18 released this 23 Aug 15:40
· 108 commits to main since this release
4875867

Changelog

We have introduced the following two index operations:

  1. Creating an index is now possible using the required fields index_name and dimension, along with optional fields such as metric, pods, replicas, pod_type, metadata_config, and source_collection.
  2. Additionally, you can now delete an index using the index_name parameter.

Examples:

  1. 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);
  1. 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");