Update data
Orama is optimized to be immutable. Rather than trying to update a document in the database, we suggest you to create the database from scratch.
For scenarios where you need to update existing documents or handle situations where documents may or may not exist, consider using the upsert
method instead, which intelligently handles both insertion and updates.
People that know what they are doing can use the update
or updateMultiple
methods, which are just aliases for remove
/removeMultiple
followed by a insert
/insertMultiple
.