Releases: pinecone-io/pinecone-java-client
v0.5.0 Release
Updated: gRPC version 1.58.0
In this release, we have upgraded the gRPC version from v1.53.0 to v1.58.0, implementing crucial adjustments. This update ensures that users can seamlessly utilize gRPC v1.58.0 without encountering the method not found errors that were prevalent in the previous version v1.53.0.
Updated: HTTP Client
Upgraded the HTTP client from AsyncHttpClient to OkHttpClient for control plane operations. Users can now make multiple client calls using a synchronous HTTP client, providing a better control and performance.
Added: Index Description
Introduced the ability to describe an index using the indexName parameter, offering more flexibility in index operations.
Example
The following example shows how to utilize OkHttpClient and synchronously call describeIndex and deleteIndex functions using indexName parameter.
// create a custom OkHttpClient
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.connectTimeout(10, java.util.concurrent.TimeUnit.SECONDS)
.readTimeout(30, java.util.concurrent.TimeUnit.SECONDS)
.writeTimeout(30, java.util.concurrent.TimeUnit.SECONDS);
OkHttpClient httpClient = builder.build();
PineconeClientConfig pineconeClientConfig = new PineconeClientConfig()
.withApiKey("PINECONE_API_KEY")
.withEnvironment("TEST_ENVIRONMENT");
// pass the custom OkHttpClient
PineconeIndexOperationClient pineconeIndexOperationClient = new PineconeIndexOperationClient(pineconeClientConfig, httpClient);
// synchronous calls to describe and delete index
pineconeIndexOperationClient.describeIndex("TEST_INDEX_NAME");
pineconeIndexOperationClient.deleteIndex("TEST_INDEX_NAME");
// close the client
pineconeIndexOperationClient.close();Added: Apache 2.0 License
Added Apache 2.0 license, ensuring compliance with licensing standards.
What's Changed
- Update http client and improve error handling by @rohanshah18 in #23
- Add Apache 2.0 LICENSE by @gdj0nes in #25
- Add support for describeIndex functionality by @rohanshah18 in #24
- Update gRPC version to 1.58.0 by @rohanshah18 in #26
New Contributors
Full Changelog: v0.4.0...v0.5.0
Release 0.4.0
Changelog
This change simplifies configuration by allowing a PineconeConnection object to be instantiated from an index url without the need to pass individual configuration fields for indexName, projectId, and environment. This change should make interactions with Pinecone's data plane more robust as there is no longer a need to parse these values out of urls which could change format over time.
Example
The following example shows how to build a PineconeConnection object from the index url. Then we show how to use the connection object to fetch a list of vectors.
PineconeClientConfig clientConfig = new PineconeClientConfig().withApiKey("PINECONE_API_KEY");
PineconeClient client = new PineconeClient(clientConfig);
PineconeConnection connection = client.connectWithUrl("https://abcdefg-123-c01b9b5.svc.us-east1-gcp.pinecone.io/");
List<String> ids = Arrays.asList("v1", "v2", "v3", "v4", "v5", "v6");
FetchRequest fetchRequest = FetchRequest.newBuilder().addAllIds(ids).setNamespace("TEST_NAMESPACE").build();
FetchResponse fetchResponse = connection.getBlockingStub().fetch(fetchRequest);Release 0.3.0
Changelog
We have introduced the following two index operations:
- Creating an index is now possible using the required fields
index_nameanddimension, along with optional fields such asmetric,pods,replicas,pod_type,metadata_config, andsource_collection. - Additionally, you can now delete an index using the
index_nameparameter.
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");
v0.2.3
v0.2.2
v0.2.1
Version 0.2.0
This is mostly a new client, based on a new ProtoBuf specification of the Pinecone API. This version is not compatible with previous version, but exposes all action available on existing Pinecone indexes.
pinecone-client v0.1.3
This is the first release that will be released to Maven Central. Only build-time functionality is changing in this release.
pinecone-client v0.1.2
update readme and bump version