T - The return type for upsert operations.U - The return type for query operations.V - The return type for fetch operations.W - The return type for update operations.X - The return type for delete operations.Y - The return type for describing index stats.Z - The return type for listing vector IDs.public interface IndexInterface<T,U,V,W,X,Y,Z>
extends java.lang.AutoCloseable
IndexInterface provides a set of methods for performing operations
such as upserting, querying, fetching, updating, and deleting vectors in an index.
It supports operations with various types of data including dense vectors, sparse vectors,
and metadata associated with the vectors. This interface is designed to be generic to support
different implementations for handling vector storage and retrieval.| Modifier and Type | Method and Description |
|---|---|
default Vector |
buildUpsertVector(java.lang.String id,
java.util.List<java.lang.Float> values,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
com.google.protobuf.Struct metadata)
Constructs a
Vector object while validating the provided arguments. |
static VectorWithUnsignedIndices |
buildUpsertVectorWithUnsignedIndices(java.lang.String id,
java.util.List<java.lang.Float> values,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
com.google.protobuf.Struct metadata)
Constructs a
VectorWithUnsignedIndices object while validating the provided arguments. |
X |
delete(java.util.List<java.lang.String> ids,
boolean deleteAll,
java.lang.String namespace,
com.google.protobuf.Struct filter)
A flexible delete operation allowing for the deletion of vectors by ID, by filter, or all vectors in a namespace.
|
X |
deleteAll(java.lang.String namespace)
Deletes all vectors within a specified namespace.
|
X |
deleteByFilter(com.google.protobuf.Struct filter)
Deletes vectors matching a specific metadata filter criteria from the default namespace.
|
X |
deleteByFilter(com.google.protobuf.Struct filter,
java.lang.String namespace)
Deletes vectors matching a specific metadata filter criteria from a specified namespace.
|
X |
deleteByIds(java.util.List<java.lang.String> ids)
Deletes a list of vectors by ID from the default namespace.
|
X |
deleteByIds(java.util.List<java.lang.String> ids,
java.lang.String namespace)
Deletes vectors identified by a list of unique IDs from a specified namespace.
|
Y |
describeIndexStats()
Retrieves statistics about the index's contents, such as vector count per namespace, and number of dimensions.
|
Y |
describeIndexStats(com.google.protobuf.Struct filter)
Retrieves statistics about the index's contents for vectors that satisfy the applied metadata filter.
|
V |
fetch(java.util.List<java.lang.String> ids)
Looks up vectors by ID from the default namespace.
|
V |
fetch(java.util.List<java.lang.String> ids,
java.lang.String namespace)
Looks up vectors by ID from a specified namespace.
|
Z |
list()
Retrieves up to
100 vector IDs from an index from the default namespace. |
Z |
list(java.lang.String namespace)
Retrieves up to
100 vector IDs from a given namespace. |
Z |
list(java.lang.String namespace,
int limit)
Retrieves up to
n vector IDs from a given namespace, where limit == n. |
Z |
list(java.lang.String namespace,
int limit,
java.lang.String paginationToken)
Retrieves up to
n vector IDs from a given namespace, targeted with a specific
paginationToken, where limit == n. |
Z |
list(java.lang.String namespace,
java.lang.String prefix)
Retrieves up to
100 vector IDs from a given namespace, filtered by a given prefix. |
Z |
list(java.lang.String namespace,
java.lang.String prefix,
int limit)
Retrieves up to
n vector IDs from a given namespace, filtered by a given prefix, where limit` == n. |
Z |
list(java.lang.String namespace,
java.lang.String prefix,
java.lang.String paginationToken)
Retrieves up to
100 vector IDs from a given namespace, filtered by a given prefix, targeted with a
specific
paginationToken. |
Z |
list(java.lang.String namespace,
java.lang.String prefix,
java.lang.String paginationToken,
int limit)
Retrieves up to
n vector IDs from a given namespace, filtered by a given prefix, targeted with a specific
paginationToken, where limit == n. |
U |
query(int topK,
java.util.List<java.lang.Float> vector,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
java.lang.String id,
java.lang.String namespace,
com.google.protobuf.Struct filter,
boolean includeValues,
boolean includeMetadata)
Queries a namespace using a provided query vector.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector)
Queries the default namespace using a provided query vector.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector,
boolean includeValues,
boolean includeMetadata)
Queries the default namespace using a provided query vector, with options to include values and metadata in the results.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector,
java.lang.String namespace)
Queries a specified namespace using a provided query vector.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector,
java.lang.String namespace,
boolean includeValues,
boolean includeMetadata)
Queries a specified namespace using a provided query vector, with options to include values and metadata in the results.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector,
java.lang.String namespace,
com.google.protobuf.Struct filter)
Queries a specified namespace using a provided query vector and a custom filter.
|
U |
queryByVector(int topK,
java.util.List<java.lang.Float> vector,
java.lang.String namespace,
com.google.protobuf.Struct filter,
boolean includeValues,
boolean includeMetadata)
Queries a specified namespace using a provided query vector, a custom filter, and options to include values and metadata in the results.
|
U |
queryByVectorId(int topK,
java.lang.String id)
Queries a namespace using a query vector.
|
U |
queryByVectorId(int topK,
java.lang.String id,
boolean includeValues,
boolean includeMetadata)
Queries a namespace using a query vector identified by an ID, with options to include values and metadata in the results.
|
U |
queryByVectorId(int topK,
java.lang.String id,
java.lang.String namespace)
Queries a specified namespace using a vector ID.
|
U |
queryByVectorId(int topK,
java.lang.String id,
java.lang.String namespace,
boolean includeValues,
boolean includeMetadata)
Queries a specified namespace using a vector ID, with options to include values and metadata in the results.
|
U |
queryByVectorId(int topK,
java.lang.String id,
java.lang.String namespace,
com.google.protobuf.Struct filter)
Queries a specified namespace using a vector ID and a custom filter.
|
U |
queryByVectorId(int topK,
java.lang.String id,
java.lang.String namespace,
com.google.protobuf.Struct filter,
boolean includeValues,
boolean includeMetadata)
Queries a specified namespace using a vector ID, a custom filter, and options to include values and metadata in the results.
|
W |
update(java.lang.String id,
java.util.List<java.lang.Float> values)
Updates an existing vector by ID with new values in the default namespace.
|
W |
update(java.lang.String id,
java.util.List<java.lang.Float> values,
java.lang.String namespace)
Updates an existing vector by ID with new values in a specified namespace.
|
W |
update(java.lang.String id,
java.util.List<java.lang.Float> values,
com.google.protobuf.Struct metadata,
java.lang.String namespace,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues)
Updates an existing vector by ID in a specified namespace.
|
T |
upsert(java.util.List<VectorWithUnsignedIndices> vectorList,
java.lang.String namespace)
Performs an upsert operation for a list of vectors within a namespace.
|
T |
upsert(java.lang.String id,
java.util.List<java.lang.Float> values)
Performs an upsert operation for a single vector in the default namespace.
|
T |
upsert(java.lang.String id,
java.util.List<java.lang.Float> values,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
com.google.protobuf.Struct metadata,
java.lang.String namespace)
Upserts a vector with both dense and sparse components, and optional metadata, into a specified namespace.
|
T |
upsert(java.lang.String id,
java.util.List<java.lang.Float> values,
java.lang.String namespace)
Performs an upsert operation for a single vector in the specified namespace.
|
default DeleteRequest |
validateDeleteRequest(java.util.List<java.lang.String> ids,
boolean deleteAll,
java.lang.String namespace,
com.google.protobuf.Struct filter)
Validates and constructs a delete request for removing vectors by their IDs or based on a filter.
|
default DescribeIndexStatsRequest |
validateDescribeIndexStatsRequest(com.google.protobuf.Struct filter)
Validates and constructs a request to describe the statistics of the index.
|
default FetchRequest |
validateFetchRequest(java.util.List<java.lang.String> ids,
java.lang.String namespace)
Validates and constructs a fetch request for retrieving vectors by their ids from a namespace.
|
default void |
validateListEndpointParameters(java.lang.String namespace,
java.lang.String prefix,
java.lang.String paginationToken,
java.lang.Integer limit,
boolean namespaceRequired,
boolean prefixRequired,
boolean paginationTokenRequired,
boolean limitRequired)
Validates the parameters for a list endpoint operation.
|
default QueryRequest |
validateQueryRequest(int topK,
java.util.List<java.lang.Float> vector,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
java.lang.String id,
java.lang.String namespace,
com.google.protobuf.Struct filter,
boolean includeValues,
boolean includeMetadata)
Validates and constructs a
QueryRequest object. |
default UpdateRequest |
validateUpdateRequest(java.lang.String id,
java.util.List<java.lang.Float> values,
com.google.protobuf.Struct metadata,
java.lang.String namespace,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues)
Validates and constructs an update request for modifying an existing vector.
|
default UpsertRequest |
validateUpsertRequest(java.util.List<VectorWithUnsignedIndices> vectorWithUnsignedIndicesList,
java.lang.String namespace)
Validates and builds an upsert request with a list of vectors and optional namespace.
|
default UpsertRequest |
validateUpsertRequest(java.lang.String id,
java.util.List<java.lang.Float> values,
java.util.List<java.lang.Long> sparseIndices,
java.util.List<java.lang.Float> sparseValues,
com.google.protobuf.Struct metadata,
java.lang.String namespace)
Validates and builds an upsert request with a single vector and optional namespace.
|
default UpsertRequest validateUpsertRequest(java.lang.String id, java.util.List<java.lang.Float> values, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, com.google.protobuf.Struct metadata, java.lang.String namespace)
id - The unique identifier of the vectorvalues - The values of the dense vectorsparseIndices - The indices for the sparse vector representationsparseValues - The values corresponding to the indices in the sparse vector representationmetadata - The metadata associated with the vectornamespace - The namespace of the vector (optional)UpsertRequest built from the provided argumentsPineconeValidationException - if there are invalid argumentsdefault UpsertRequest validateUpsertRequest(java.util.List<VectorWithUnsignedIndices> vectorWithUnsignedIndicesList, java.lang.String namespace)
vectorWithUnsignedIndicesList - A list of VectorWithUnsignedIndices objects representing the vectors to upsert.namespace - The namespace within which these vectors should be upserted. This parameter is optional.UpsertRequest object constructed based on the provided vectors and namespace.PineconeValidationException - if any of the vectors contain invalid arguments.default Vector buildUpsertVector(java.lang.String id, java.util.List<java.lang.Float> values, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, com.google.protobuf.Struct metadata)
Vector object while validating the provided arguments. This helper method is used in a
variety of upsert operations.id - The unique identifier for the vector.values - The dense vector values.sparseIndices - Indices for sparse vector representation.sparseValues - Values for the sparse indices.metadata - Metadata associated with the vector.Vector object constructed from the provided arguments.PineconeValidationException - if there are invalid arguments.static VectorWithUnsignedIndices buildUpsertVectorWithUnsignedIndices(java.lang.String id, java.util.List<java.lang.Float> values, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, com.google.protobuf.Struct metadata)
VectorWithUnsignedIndices object while validating the provided arguments. This helper method
is used in a variety of upsert operations.id - The unique identifier for the vector.values - The dense vector values.sparseIndices - Indices for sparse vector representation, using unsigned integers.sparseValues - Values for the sparse indices.metadata - Metadata associated with the vector.VectorWithUnsignedIndices object constructed from the provided arguments.PineconeValidationException - if there are invalid arguments.default QueryRequest validateQueryRequest(int topK, java.util.List<java.lang.Float> vector, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, java.lang.String id, java.lang.String namespace, com.google.protobuf.Struct filter, boolean includeValues, boolean includeMetadata)
QueryRequest object.topK - The number of top matching vectors to retrieve.vector - The query vector for similarity search. If querying with vector, id must be null.sparseIndices - Indices for sparse query vector.sparseValues - Values for the sparse query vector.id - The unique identifier of the vector to query. If querying with id, vector must be null.namespace - The namespace from which to query vectors.filter - The filter to apply. You can use vector metadata to limit your search.includeValues - Flag indicating whether to include vector values in the response.includeMetadata - Flag indicating whether to include metadata in the response.QueryRequest object constructed from the provided arguments.PineconeValidationException - if there are invalid request arguments.default FetchRequest validateFetchRequest(java.util.List<java.lang.String> ids, java.lang.String namespace)
ids - The list of vector IDs to fetch.namespace - The namespace to fetch vectors from. If not specified, the default namespace is used.FetchRequest object constructed from the provided IDs and namespace.PineconeValidationException - if the vector IDs are not provided.default UpdateRequest validateUpdateRequest(java.lang.String id, java.util.List<java.lang.Float> values, com.google.protobuf.Struct metadata, java.lang.String namespace, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues)
id - The unique ID of the vector to update.values - The new values for the vector. If provided, these values replace the existing ones.metadata - The new metadata for the vector. If provided, it replaces the existing metadata.namespace - The namespace of the vector to be updated. If not specified, the default namespace is used.sparseIndices - Indices for updating a sparse vector representation.sparseValues - Values corresponding to the sparse indices.UpdateRequest object constructed from the provided parameters.PineconeValidationException - if there are invalid arguments.default DeleteRequest validateDeleteRequest(java.util.List<java.lang.String> ids, boolean deleteAll, java.lang.String namespace, com.google.protobuf.Struct filter)
ids - The list of vector IDs to delete.deleteAll - Flag indicating whether to delete all vectors in the namespace.namespace - The namespace from which to delete the vectors. This parameter is optional if deleteAll is true.filter - A metadata filter used to select the vectors to delete. Mutually exclusive with ids and deleteAll.DeleteRequest object constructed from the provided parameters.PineconeValidationException - if the request parameters are invalid.default DescribeIndexStatsRequest validateDescribeIndexStatsRequest(com.google.protobuf.Struct filter)
filter - If a filter is provided, the operation returns statistics for vectors that match the filter.DescribeIndexStatsRequest object constructed from the provided filter.T upsert(java.util.List<VectorWithUnsignedIndices> vectorList, java.lang.String namespace)
vectorList - A list of vectors with unsigned indices to upsert.namespace - The namespace where the vectors should be upserted. This is optional.T indicating the result of the upsert operation.T upsert(java.lang.String id, java.util.List<java.lang.Float> values)
id - The unique identifier of the vector.values - The list of floating-point values that represent the vector.T indicating the result of the upsert operation.T upsert(java.lang.String id, java.util.List<java.lang.Float> values, java.lang.String namespace)
id - The unique identifier of the vector.values - The list of floating-point values that represent the vector.namespace - The namespace where the vector should be upserted. This is optional.T indicating the result of the upsert operation.T upsert(java.lang.String id, java.util.List<java.lang.Float> values, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, com.google.protobuf.Struct metadata, java.lang.String namespace)
id - The unique identifier for the vector.values - The dense vector values.sparseIndices - Indices for sparse vector representation.sparseValues - Values for the sparse indices.metadata - Metadata associated with the vector.namespace - The namespace to upsert the vector into. This is optional.T indicating the result of the upsert operation.U queryByVectorId(int topK, java.lang.String id)
topK - The number of top similar vectors to retrieve.id - The unique id of a vector to be used as a query vector.U representing the query results.U queryByVectorId(int topK, java.lang.String id, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.id - The unique ID of a vector to be used as a query vector.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters.U queryByVectorId(int topK, java.lang.String id, java.lang.String namespace)
topK - The number of top similar vectors to retrieve.id - The unique ID of a vector to be used as a query vector.namespace - The namespace within which the query is performed.U representing the query results.U queryByVectorId(int topK, java.lang.String id, java.lang.String namespace, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.id - The unique ID of a vector to be used as a query vector.namespace - The namespace within which the query is performed.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters.U queryByVectorId(int topK, java.lang.String id, java.lang.String namespace, com.google.protobuf.Struct filter)
topK - The number of top similar vectors to retrieve.id - The unique ID of a vector to be used as a query vector.namespace - The namespace within which the query is performed.filter - A Struct defining additional filtering criteria for the query.U representing the query results, filtered according to the provided criteria.U queryByVectorId(int topK, java.lang.String id, java.lang.String namespace, com.google.protobuf.Struct filter, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.id - The unique ID of a vector to be used as a query vector.namespace - The namespace within which the query is performed.filter - A Struct defining additional filtering criteria for the query.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters and filtered according to the provided criteria.U queryByVector(int topK, java.util.List<java.lang.Float> vector)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.U representing the query results.U queryByVector(int topK, java.util.List<java.lang.Float> vector, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters.U queryByVector(int topK, java.util.List<java.lang.Float> vector, java.lang.String namespace)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.namespace - The namespace within which the query is performed.U representing the query results.U queryByVector(int topK, java.util.List<java.lang.Float> vector, java.lang.String namespace, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.namespace - The namespace within which the query is performed.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters.U queryByVector(int topK, java.util.List<java.lang.Float> vector, java.lang.String namespace, com.google.protobuf.Struct filter)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.namespace - The namespace within which the query is performed.filter - A Struct defining additional filtering criteria for the query.U representing the query results, filtered according to the provided criteria.U queryByVector(int topK, java.util.List<java.lang.Float> vector, java.lang.String namespace, com.google.protobuf.Struct filter, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.vector - The query vector as a list of floating-point values.namespace - The namespace within which the query is performed.filter - A Struct defining additional filtering criteria for the query.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results, including optional values and metadata based on parameters and filtered according to the provided criteria.U query(int topK, java.util.List<java.lang.Float> vector, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues, java.lang.String id, java.lang.String namespace, com.google.protobuf.Struct filter, boolean includeValues, boolean includeMetadata)
topK - The number of top similar vectors to retrieve.vector - The dense query vector as a list of floating-point values. Each query can contain only one of the parameters: vector or id.sparseIndices - The indices of the sparse vector representation, if applicable.sparseValues - The values at the specified indices of the sparse vector representation.id - The unique ID of a vector to be used as a query vector. Each query can contain only one of the parameters: vector or id.namespace - The namespace within which the query is performed.filter - A Struct defining additional filtering criteria for the query.includeValues - Flag indicating whether to include the vector values in the query results.includeMetadata - Flag indicating whether to include the vector metadata in the query results.U representing the query results containing a list of the closest vectors and a namespace name.V fetch(java.util.List<java.lang.String> ids)
ids - A list of unique identifiers for the vectors to fetch.V representing the fetched vectors and the namespace.V fetch(java.util.List<java.lang.String> ids, java.lang.String namespace)
ids - A list of unique identifiers for the vectors to fetch.namespace - The namespace to fetch vectors from.V representing the fetched vectors and the namespace.W update(java.lang.String id, java.util.List<java.lang.Float> values)
id - The unique identifier of the vector to update.values - The new list of vector values to assign to set.W representing the result of the update operation.W update(java.lang.String id, java.util.List<java.lang.Float> values, java.lang.String namespace)
id - The unique identifier of the vector to update.values - The new list of vector values to assign to set.namespace - The namespace in which to update the vector.W representing the result of the update operation.W update(java.lang.String id, java.util.List<java.lang.Float> values, com.google.protobuf.Struct metadata, java.lang.String namespace, java.util.List<java.lang.Long> sparseIndices, java.util.List<java.lang.Float> sparseValues)
id - The unique identifier of the vector to be updated.values - The new list of floating-point values for the vector's dense representation. Previous values are overwritten.metadata - Optional new metadata to associate with the vector. If provided, it replaces the existing metadata.namespace - The namespace in which the vector resides and will be updated.sparseIndices - Indices for the sparse vector representation, if applicable.sparseValues - Values for the sparse vector representation. Must correspond to the provided indices.W representing the result of the update operation.X deleteByIds(java.util.List<java.lang.String> ids)
ids - A list of unique vector IDs to be deleted.X indicating the result of the delete operation.X deleteByIds(java.util.List<java.lang.String> ids, java.lang.String namespace)
ids - A list of unique vector IDs to be deleted.namespace - The namespace from which the vectors will be deleted.X indicating the result of the delete operation.X deleteByFilter(com.google.protobuf.Struct filter)
filter - The metadata filter used to select vectors to delete.X indicating the result of the delete operation.X deleteByFilter(com.google.protobuf.Struct filter, java.lang.String namespace)
filter - The metadata filter used to select vectors to delete.namespace - The namespace from which the vectors matching the filter will be deleted.X indicating the result of the delete operation.X deleteAll(java.lang.String namespace)
null is passed, all vectors in the
default namespace are deleted.namespace - The namespace from which all vectors will be deleted. If not specified the default will be used.X indicating the result of the delete all operation.X delete(java.util.List<java.lang.String> ids, boolean deleteAll, java.lang.String namespace, com.google.protobuf.Struct filter)
ids - A list of unique identifiers for specific vectors to be deleted. Ignored if deleteAll is true.deleteAll - A boolean flag indicating whether to delete all vectors in the specified namespace.namespace - The namespace from which vectors will be deleted. If not specified, the default namespace is used.filter - An optional Struct defining additional filtering criteria for vectors to be deleted. Ignored if deleteAll is true.X indicating the result of the delete operation.Y describeIndexStats()
Y that contains the stats about the index.Y describeIndexStats(com.google.protobuf.Struct filter)
filter - A metadata filter used to select vectors that satisfy the filter criteria.Y that contains the stats about the index.default void validateListEndpointParameters(java.lang.String namespace,
java.lang.String prefix,
java.lang.String paginationToken,
java.lang.Integer limit,
boolean namespaceRequired,
boolean prefixRequired,
boolean paginationTokenRequired,
boolean limitRequired)
Validates the parameters for a list endpoint operation.
It throws a PineconeValidationException if any required validation fails. The "...Required"
parameters indicate which method signature is used.
Example
try {
String namespace = "example-namespace";
String prefix = "example-prefix";
String paginationToken = "token123";
Integer limit = 50;
// Indicate which parameters are required
validateListEndpointParameters(namespace, prefix, paginationToken, limit, true, true, true);
} catch (PineconeValidationException e) {
System.err.println("Validation error: " + e.getMessage());
}
:namespace - The namespace parameter which is validated based on the namespaceRequired flag.prefix - The prefix parameter which is validated based on the prefixRequired flag.paginationToken - The pagination token parameter which is validated based on the paginationTokenRequired flag.limit - The limit for the number of items, validated to be a positive integer if limitRequired is true.namespaceRequired - Specifies if the namespace parameter is required and should be validated.prefixRequired - Specifies if the prefix parameter is required and should be validated.paginationTokenRequired - Specifies if the pagination token parameter is required and should be validated.limitRequired - Specifies if the limit parameter is required and should be a positive integer.PineconeValidationException - if any parameter fails its validation check based on its requirements.Z list()
100 vector IDs from an index from the default namespace.Y that contains vector IDs.Z list(java.lang.String namespace)
100 vector IDs from a given namespace.namespace - The namespace that holds the vector IDs you want to retrieve.Y that contains vector IDs.Z list(java.lang.String namespace, int limit, java.lang.String paginationToken)
n vector IDs from a given namespace, targeted with a specific
paginationToken, where limit == n.namespace - The namespace that holds the vector IDs you want to retrieve.limit - The maximum number of vector IDs to retrieve.paginationToken - The token to paginate through the list of vector IDs.Y that contains vector IDs.Z list(java.lang.String namespace, int limit)
n vector IDs from a given namespace, where limit == n.namespace - The namespace that holds the vector IDs you want to retrieve.limit - The maximum number of vector IDs to retrieve.Y that contains vector IDs.Z list(java.lang.String namespace, java.lang.String prefix)
100 vector IDs from a given namespace, filtered by a given prefix.namespace - The namespace that holds the vector IDs you want to retrieve.prefix: - The prefix to filter the vector IDs by.Y that contains vector IDs.Z list(java.lang.String namespace, java.lang.String prefix, int limit)
n vector IDs from a given namespace, filtered by a given prefix, where limit` == n.namespace - The namespace that holds the vector IDs you want to retrieve.prefix - The prefix to filter the vector IDs by.limit - The maximum number of vector IDs to retrieve.Y that contains vector IDs.Z list(java.lang.String namespace, java.lang.String prefix, java.lang.String paginationToken)
100 vector IDs from a given namespace, filtered by a given prefix, targeted with a
specific
paginationToken.namespace - The namespace that holds the vector IDs you want to retrieve.paginationToken - The token to paginate through the list of vector IDs.Y that contains vector IDs.Z list(java.lang.String namespace, java.lang.String prefix, java.lang.String paginationToken, int limit)
n vector IDs from a given namespace, filtered by a given prefix, targeted with a specific
paginationToken, where limit == n.namespace - The namespace that holds the vector IDs you want to retrieve.prefix - The prefix to filter the vector IDs by.paginationToken - The token to paginate through the list of vector IDs.limit - The maximum number of vector IDs to retrieve.Y that contains vector IDs.