main. The REST request accepts an optional branch field. To write to another branch, create it first, then include its name in branch; a tag or alias is not a valid write target.
Document field names are preserved as supplied in every SDK. The examples use dense_vector and sparse_vector; configure indexes with those same names to search these values.
If the collection contains native embedding vector fields, send only the configured source text fields. Do not send direct vector values for native embedding fields in an upsert request.
Response
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.
IDs and retries
The acceptance response does not return auto-generated IDs. If you need to fetch, update, delete, or retry a document later, assign its ID before sending the request. Repeating an upsert without an ID can create another document with a new ID. Keep the same ID, branch, and partition-field value when replaying a write. An upsert replaces the entire document at that identity, so replaying an older payload can overwrite newer changes. Stable IDs prevent duplicate identities; they do not make writes conditional on the current document version. If a request times out or the connection closes after dispatch, its outcome may be unknown. Fetch the expected IDs from the same branch withconsistentRead: true and, for a partitioned collection, a partitionFilter selecting the original partition. Compare the stored content with the intended payload before deciding whether a retry is still needed. Do not infer write failure from an empty eventually consistent result. If that verification also fails, retain the unknown outcome and use the error-specific retry guidance.
For a partitioned collection, documents are upserted into the
__default__ partition if the partition field is not provided.Upsert limits
When upserting larger amounts of data, it is recommended to use
bulk-upsert operation.