await index.upsert({ id: "star-wars", content: { title: "Star Wars", genre: "sci-fi" }, metadata: { year: 1977 } });
Used to add new documents or update an existing document.
You can only upsert documents with the same structure as defined in your database.
Hide child attributes
'Success' on successful operation.
'Success'
Was this page helpful?