pinecone-io / pinecone-java-client

The official Java client for the Pinecone vector database

Home Page:https://www.pinecone.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PineconeIndexOperationClient#createIndex fails to create a new index.

tzolov opened this issue · comments

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Current attempt to create an index result into:

Exception in thread "main" io.pinecone.exceptions.PineconeNotFoundException: 
        at io.pinecone.exceptions.HttpErrorMapper.mapHttpStatusError(HttpErrorMapper.java:13)
        at io.pinecone.PineconeIndexOperationClient.handleResponse(PineconeIndexOperationClient.java:95)
        at io.pinecone.PineconeIndexOperationClient.createIndex(PineconeIndexOperationClient.java:62)
        at org.springframework.ai.vectorstore.Main.main(Main.java:43)

Note that using the same environment and credentials I can create index via the UI page as well as the https://docs.pinecone.io/reference/create_index?environment=gcp-starter.

Expected Behavior

New my_test_index index should be created.

Steps To Reproduce

Valid

  • ApiKey for FreeTier subscription
  • "gcp-starter" environment
  • project with Id: ****.
  • NO EXISTING IDEXES.
	public static void main(String[] args) throws IOException {

		PineconeClientConfig clientConfig = new PineconeClientConfig()
				.withApiKey("********************************")
				.withProjectName("****")
				.withEnvironment("gcp-starter");

		CreateIndexRequest createIndexRequest = new CreateIndexRequest()
				.withIndexName("my_test_index").withDimension(3);

		PineconeIndexOperationClient indexOperationClient = new PineconeIndexOperationClient(clientConfig);

		indexOperationClient.createIndex(createIndexRequest);
	}

Relevant log output

Exception in thread "main" io.pinecone.exceptions.PineconeNotFoundException: 
        at io.pinecone.exceptions.HttpErrorMapper.mapHttpStatusError(HttpErrorMapper.java:13)
        at io.pinecone.PineconeIndexOperationClient.handleResponse(PineconeIndexOperationClient.java:95)
        at io.pinecone.PineconeIndexOperationClient.createIndex(PineconeIndexOperationClient.java:62)
        at org.springframework.ai.vectorstore.Main.main(Main.java:43)

Environment

- **OS**: Intel Mac OS 13.5.2 (22G91)
- **Language version**: Java 17
- **Pinecone client version**: maven dependency pinecone-client:0.6.0

Additional Context

No response

Thanks for reporting this issue. Due to some updates on the backend, there will be some compatibility issues in java sdk's control plane, so please expect a new release soon.

@tzolov There should be no issues on data plane but for control plane operations, please continue to use the console.

I have released Java SDK v0.7.4, please let me know if the new release resolves the gcp-starter env issues.

Closing this issue since I have a confirmation that it has been resolved.
#56 (comment)