Example Calls
Info
Method
The info method provides statistical information about the index, returning the following fields:
vector_count: The total number of vectors in the index.pending_vector_count: The number of vectors that are currently pending (not yet fully processed).index_size: The size of the index in bytes.dimension: How many dimensions the index hassimilarity_function: Similarity function chosen for the indexnamespaces: Map of namespace names of the index to their statistics.
Info Example
from upstash_vector import Indexindex = Index.from_env()from upstash_vector import Indexindex = Index.from_env()# Get statistical information about the indexinfo_result = index.info()# Display the info resultprint("Vector Count:", info_result.vector_count)print("Pending Vector Count:", info_result.pending_vector_count)print("Index Size:", info_result.index_size)print("Dimension:", info_result.dimension)print("Similarity Function:", info_result.similarity_function)for ns, ns_info in info_result.namespaces.items(): print("Namespace:", ns, "Vector Count:", ns_info.vector_count) print("Namespace:", ns, "Pending Vector Count:", ns_info.pending_vector_count)