With UPSERT statement Clusterpoint can update a particular document or insert new document.

The UPSERT command rewrites mentioned fields or adds new field (if such does not exist) in existing document, or if a document with the specified ID does not exist, the UPSERT command creates new document.

Default syntax:

UPSERT collection["document_id"] SET field = "new_value"

An example for "product" collection:

UPSERT product["34940855"] SET availability = "OutOfStock", category = "Bike/Bicycles"