Methods
Theupdate method enables you to update the vector, metadata, or data
of a vector.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
update method enables you to update the vector, metadata, or data
of a vector.
from upstash_vector import Index
index = Index.from_env()
updated = index.update(
id="id1",
metadata={"new": "metadata"},
data="new-data",
)
print(updated)
from upstash_vector import Index
from upstash_vector.types import MetadataUpdateMode
index = Index.from_env()
updated = index.update(
id="id2",
metadata={
"existing-field": "new-value",
"existing-field-to-delete": None,
"new-field": "new-value",
},
metadata_update_mode=MetadataUpdateMode.PATCH,
)
print(updated)
index.update(..., namespace="ns")
Was this page helpful?