Use payload operations to update metadata without changing vectors. set_payload merges fields, overwrite_payload replaces the full payload, delete_payload removes selected keys, and clear_payload removes all payload data from matching points.
Before you begin, make sure the target points already exist in your collection. Payload operations can target explicit point IDs or a filter.
Merge payload fields
Use set_payload to add or replace specific fields while preserving the rest of each point’s payload.
from actian_vectorai import VectorAIClient
COLLECTION = "products"
with VectorAIClient("localhost:6574") as client:
result = client.points.set_payload(
COLLECTION,
{"price": 899.99, "in_stock": True, "updated": True},
ids=[1],
)
print(f"Updated payload: {result}")
Replace an entire payload
Use overwrite_payload when the new object should become the complete payload for the selected points.
from actian_vectorai import VectorAIClient
COLLECTION = "products"
with VectorAIClient("localhost:6574") as client:
result = client.points.overwrite_payload(
COLLECTION,
{
"name": "Gaming Laptop",
"category": "electronics",
"price": 1299.99,
},
ids=[1],
)
print(f"Replaced payload: {result}")
Remove payload fields
Use delete_payload to remove selected keys while leaving other payload fields unchanged.
from actian_vectorai import VectorAIClient
COLLECTION = "products"
with VectorAIClient("localhost:6574") as client:
result = client.points.delete_payload(
COLLECTION,
["temporary_flag", "debug_info"],
ids=[1, 2],
strict=False,
)
print(f"Removed payload fields: {result}")
Clear all payload data
Use clear_payload when matching points should keep their vectors and IDs but have no payload metadata.
from actian_vectorai import VectorAIClient
COLLECTION = "products"
with VectorAIClient("localhost:6574") as client:
result = client.points.clear_payload(COLLECTION, ids=[3])
print(f"Cleared payload: {result}")