Documentation Index
Fetch the complete documentation index at: https://databridge-add-core-funcs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
def update_document_metadata(
document_id: str,
metadata: Dict[str, Any],
) -> Document
async def update_document_metadata(
document_id: str,
metadata: Dict[str, Any],
) -> Document
Parameters
document_id (str): ID of the document to update
metadata (Dict[str, Any]): Metadata to update
You can supply Python datetime, date, Decimal, and numeric types in metadata. The SDK serializes them with the correct metadata_types, so subsequent filters can leverage the operators from the Metadata Filtering guide.
Returns
Document: Updated document metadata
Examples
from morphik import Morphik
db = Morphik()
# Update just the metadata of a document
updated_doc = db.update_document_metadata(
document_id="doc_123",
metadata={"status": "reviewed", "reviewer": "Jane Smith"}
)
print(f"Updated metadata: {updated_doc.metadata}")
from morphik import AsyncMorphik
async with AsyncMorphik() as db:
# Update just the metadata of a document
updated_doc = await db.update_document_metadata(
document_id="doc_123",
metadata={"status": "reviewed", "reviewer": "Jane Smith"}
)
print(f"Updated metadata: {updated_doc.metadata}")