Skip to content

v1.1.0 Release

Compare
Choose a tag to compare
@rohanshah18 rohanshah18 released this 09 May 22:02
· 29 commits to main since this release
891debd

Added: List vector IDs

We have added the ability to list vector IDs as a part of data plane operations. By default, the list returns up to 100 IDs at a time by default in sorted order. If the limit parameter is set, list returns up to that number of IDs instead. The list operation can be called using any following methods:

  1. list()
  2. list(String namespace)
  3. list(String namespace, int limit)
  4. list(String namespace, String prefix)
  5. list(String namespace, String prefix, int limit)
  6. list(String namespace, String prefix, String paginationToken)
  7. list(String namespace, String prefix, String paginationToken, int limit)

Briefly, the parameters are explained below:

  1. prefix – The prefix with which vector IDs must start to be included in the response.
  2. paginationToken – The token to paginate through the list of vector IDs.
  3. limit – The maximum number of vector IDs you want to retrieve.
  4. namespace – The namespace to list vector IDs from.

Example

The following demonstrates how to use the list endpoint to get vector IDs from a specific namespace, filtered by a given prefix.

import io.pinecone.clients.Index;
import io.pinecone.clients.Pinecone;
import io.pinecone.proto.ListResponse;
...

Pinecone pinecone = new Pinecone.Builder(System.getenv("PINECONE_API_KEY")).build();
String indexName = "example-index";
Index index = pinecone.getIndexConnection(indexName);
ListResponse listResponse = index.list("example-namespace", "prefix-");

What's Changed

Full Changelog: v1.0.0...v1.1.0