Add/overwrite the metadata of existing documents.
For each document to update, the new metadata dictionary is appended to the existing metadata, overwriting individual keys that existed already.
update_metadata(
self,
id_to_metadata: dict[str, dict],
*,
overwrite_concurrency: int | None = None
) -> int| Name | Type | Description |
|---|---|---|
id_to_metadata* | dict[str, dict] | map from the Document IDs to modify to the new metadata for updating. Keys in this dictionary that do not correspond to an existing document will be silently ignored. The values of this map are metadata dictionaries for updating the documents. Any pre-existing metadata will be merged with these entries, which take precedence on a key-by-key basis. |
overwrite_concurrency | int | None | Default: Nonenumber of threads to process the updates. Defaults to the vector-store overall setting if not provided. |