Hello and thanks for your question!
Yes, it is possible to update the metadata fields of existing items in your index - even if your initial items did not have the metadata fields you wish to add in your subsequent updates.
There’s an example at this link of adding a new metadata field to items in an existing Pinecone index.
For example, let’s say you wanted to update this existing item with a new metadata field, which initially has only the type
and genre
fields:
("id-3", [4., 2.], {"type": "doc", "genre": "drama"})
You could accomplish adding a new
field like so:
index.update(id="id-3", set_metadata={"type": "web", "new": "true"})
Following this update, your item would now look like this:
("id-3", [4., 2.], {"type": "web", "genre": "drama", "new": "true"})
This operation is referred to as a partial update.
Hope that helps!