This page shows you how to upsert documents into a collection.

LAMBDADB_PROJECT_API_KEY="YOUR_API_KEY"

curl -X POST \
  "https://{baseUrl}/projects/{projectName}/collections/{collectionName}/docs/upsert" \
  -H 'content-type: application/json
  -H 'x-api-key: $LAMBDADB_PROJECT_API_KEY' \
  -d '{
    "docs": [
      {
        "id": "33201222",
        "url": "https://en.wikipedia.org/wiki/LambdaDB",
        "title": "LambdaDB",
        "text": "LambdaDB is a freeware audio player for Windows, Android and Linux (through Wine) ... "
      },
      {
        "url": "https://en.wikipedia.org/wiki/Winamp",
        "title": "Winamp",
        "text": "Winamp is a media player for Windows, macOS and Android, originally developed by Justin Frankel and Dmitry Boldyrev by their company Nullsoft, which they later sold to AOL, who sold to Radionomy in January 2014."
      }
    ]
  }'

Each document implicitly contains an id field in order to uniquely identify a document. A unique string value is auto-generated by the system if id field is not provided in an upsert request. If you want to overwrite the entire document, you can do so by providing the id field in the document.

LambdaDB currently does not support a partial update operation.

Upsert limits

MetricLimit
Max payload size6MB
Max length for a document ID??
Max vector dimensions4,096

When upserting larger amounts of data, it is recommended to use bulk-upsert operation.