Hi, is there a way to do a partial upsert of a doc...
# community-help
g
Hi, is there a way to do a partial upsert of a document? Thank you
j
Partial update you mean? Because upsert by definition is the full document (if this document doesn't exist, then insert this as the full document)
g
Ah ok I see 🙂 Ok so I should either do an update or creation.
Thanks
j
Yup, upserts are already supported for single docs: https://typesense.org/docs/0.21.0/api/documents.html#upsert and batch docs: https://typesense.org/docs/0.21.0/api/documents.html#action-modes (action=upsert)
g
I was asking this because I have an input from a hook that is a partial document with optionnaly the id of the document. So I will call either update or create.
👍 1