Method
Thedelete method allows you to remove vectors from the index based on their identifiers. It returns the following field in response:
deleted: An integer indicating how many vectors were deleted with the command.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
delete method allows you to remove vectors from the index based on their identifiers. It returns the following field in response:
deleted: An integer indicating how many vectors were deleted with the command.from upstash_vector import Index
index = Index.from_env()
# Specify the identifiers of vectors to be deleted
ids_to_delete = ["id1", "id2", "id3"]
# Delete the specified vectors
delete_result = index.delete(ids=ids_to_delete)
# Display the number of vectors deleted
print("Number of Vectors Deleted:", delete_result.deleted)
index.delete("id-4")
Was this page helpful?