Deleting All Documents with Filter_by
TLDR Mischa wants to delete all documents using id:*
filter but encounters issues. Jason suggests a workaround and advises creating a GitHub issue for the desired feature.
Powered by Struct AI
6
7mo
May 16, 2023 (7 months ago)
Mischa
Mischa
12:49 AMSince there is no "delete all documents" function I am trying to use a filter_by
But it seems to leave some records. Any idea why?
id:*
But it seems to leave some records. Any idea why?
Jason
Jason
12:58 AMHmm! I’m surprised
id:*
actually matches any documents, since wild-cards are not supported like that…12:59
Jason
12:59 AMIf you have a numeric field, one thing you could do is delete by
numeric_field>:0
assuming there are no negative valuesMischa
Mischa
01:01 AMi would really like a generic thing since i want to be able to just wipe all my collections, modify schemas, then reindex everything
Jason
Jason
01:04 AMWe unfortunately don’t have a generic way to “truncate” a collection at this time. Could you create a GitHub issue for it, so we can track it?
Mischa
Mischa
01:05 AMTypesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 3011 threads (79% resolved)
Similar Threads
Deleting All Documents in Typesense Collection
Vikas wanted to delete all documents in a typesense collection. Kishore Nallan suggested using a range filter on a numerical field to match and delete the entire dataset.
3
32mo
Solved
Deleting Documents from Collection using Specific Ids
Ahmad asked how to delete documents from a collection using specific ids. Jason suggested using the delete by query method and provided related documentation links.
4
24mo
Solved
Effective Document Deletion Strategies in Typesense
Adrian asked about deleting potentially non-existent documents. Pantelis suggested using IDs for document deletion or queries within delete function. Adrian decided to use query-based deletions.
7
4mo
Solved