Skip to main content
This page shows you how to update documents in a collection.
from lambdadb import LambdaDB

with LambdaDB(
    project_api_key="YOUR_API_KEY",
    base_url="YOUR_BASE_URL",
    project_name="YOUR_PROJECT_NAME",
) as client:
    coll = client.collection("my_collection")
    docs = [
        {"id": "33201222", "title": "LambdaDB", "text": "LambdaDB is an AI-native database ... "},
        {"id": "33201223", "url": "https://en.wikipedia.org/wiki/Winamp", "title": "Winamp v2", "text": "Winamp v2 is a media player for Windows, macOS and Android, originally developed by Nullsoft."},
    ]
    coll.docs.update(docs=docs)
Each document in a payload must contain an id field to uniquely identify a document to update. For a partitioned collection, a document in __default__ partition with matching id value is updated if partition field is not provided.

Update limits

MetricLimit
Max payload size6MB
Max length for a document ID512 characters
Max vector dimensions4,096
Max document size50KB