#community-help

Deleting All Documents in Typesense Collection on Dashboard

TLDR Stephano asked how to delete all documents in a collection. Jason suggested using delete by query with a numerical field until the feature is officially added.

Powered by Struct AI
+11
4
27mo
Solved
Join the chat
Jun 14, 2021 (27 months ago)
Stephano
Photo of md5-1b5a9819eb84d9342bdcd7da73258779
Stephano
03:29 PM
Jason how do you delete all documents in the collection using the dashboard?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:42 PM
We’re yet to add a way to truncate a collection in Typesense core. So until then you want to delete by query using a numerical field, and do something like numerical_field:>=0
03:42
Jason
03:42 PM
You’ll find this option under delete documents
Stephano
Photo of md5-1b5a9819eb84d9342bdcd7da73258779
Stephano
04:42 PM
Okay yeah, thanks. I actually tried running that abs it didn’t delete any items, I’ll try again next time I have documents (ended up just deleting collection) and let u know here it it worked
+11