Hello, started using typesense for an internal ser...
# community-help
v
Hello, started using typesense for an internal service and have been loving it. API's are great and easy to use. I have hit one hurdle where I want to delete all documents for a collection. I know we can delete the collection itself but was checking if there is a way to delete all documents. I have seen delete by filter_by api as well, but I cannot run something like name "not equal"(name: !="blah") to match all documents and delete them. Any pointers?
k
@Vikas We don't have a truncate collection end-point. However, you can achieve that with delete by filter API by doing a range filter on a numerical field with a value that matches the whole dataset. E.g.
points: >= 0
v
thanks @Kishore Nallan I had that as a backup plan.