Adrian Kager
08/08/2023, 2:29 PMCould not find a document with id:
error and treating that as a non error case, or is there a better way to do so? Perhaps deleting by query would be a better approachPantelis Panayiotou
08/08/2023, 2:32 PMAdrian Kager
08/08/2023, 2:38 PMPantelis Panayiotou
08/08/2023, 2:43 PMtypesenseClient.collection('your-collection').documents.delete('your-document-id')
If it is not found then i am catching the error. The delete accepts idOrQuery. So if you have assigned an id before in each of your documents then typesense will find it and delete it. When i want to delete a set of documents i use a query inside delete, for instance: delete('submitted:=true')
which is going to find all the submitted documents in your schema and delete themAdrian Kager
08/08/2023, 2:47 PMAdrian Kager
08/08/2023, 2:47 PMPantelis Panayiotou
08/08/2023, 2:48 PM