Hey I have a question about indexing and upserting...
# community-help
b
Hey I have a question about indexing and upserting documents - from the docs here https://typesense.org/docs/26.0/api/documents.html#index-a-single-document its not clear to me what the difference in behaviour to these two actions are? Does indexing a document never update it if it already exists?
j
Hey Ben! 👋 "Index" is a generic word, for the following actions: create, update, upsert and emplace.
The default action is
create
which means that if the same document with the same
id
is sent into Typesense twice, the first request will create it, the second will fail because the document already exists
b
hey Jason hope you are well! That info would be super helpful in the docs I think
j
Got it, yup will add that it in as a tip in the docs
🙌 1