How do I update multiple vectors at once?

Hi,

I want to update the metadata for a batch of vectors in one operation. Right now, the API supports updating a single vector. But there seems to be no support for updating multiple vectors. How can I do this? Current solution is to iterate through every vector and call update, but this seems crazy when you have thousands of vectors.

Thank you!

Hi @jonathan3!
Could you provide more details about the specific pattern you are aiming for? Are you hoping to send multiple unrelated updates in a single API call, or do these updates follow a common logic, similar to a SQL UPDATE command?

Common logic. The update is the same for all vectors –– modifying a single key/value pair in the metadata for each vector.

I’m also really interested in this feature. The current method (docs) of updating one record at a time is incredibly inefficient for a large amount of data.

This implementation will take around 7 hours for 230K records…

for i in tqdm(metadata_for_upload.index):
	index.update(
		id=i, 
		set_metadata={"field 1": metadata_for_upload.loc[i, 'field 1']}, 
		namespace=namespace
	)

Bump. This is a necessary feature for us