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 index
Info Example
from upstash_vector import Index
index = Index.from_env()
# Get statistical information about the index
info_result = index.info()
# Display the info result
print("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)