# Take out all the nodes from the active index nodes = index.docstore.docs # Iterate over the nodes to add metadata or update text. for node in nodes: node.metadata["new_key"] = "new_value" # Now add the updated node to a new index new_index = VectorStoreIndex(nodes,...)