Deleting Documents from Typesense Cloud and Version Upgrade
TLDR Masahiro asked how to remove documents from Typesense. Kishore Nallan clarified it varies by version and suggested upgrading from 0.20 to 0.22. Masahiro agreed to test this.
Dec 15, 2021 (23 months ago)
Masahiro
06:58 AMI have a question about how to remove documents from Typesense (Typesense Cloud).
For example, if I want to delete 100 documents from a collection, how do I write the query? I used page and per_page, but I could not limit the number of documents to be deleted.
Regards
Kishore Nallan
07:00 AMKishore Nallan
07:01 AMMasahiro
07:07 AMMine is 0.20.0.
Is there any way to write the query as follows?
client
.collections("reactions")
.documents()
.delete({
limit: 100,
filter_by:
updatedAt:>${unixTimestamp}&&reactionType:=2,
});
Kishore Nallan
07:08 AMKishore Nallan
07:08 AMMasahiro
07:09 AMKishore Nallan
07:13 AMAn alternative approach will be to launch a new 0.22 cluster, re-index your data, test and switch your app and shut the old clusters after that.
Masahiro
07:30 AMTypesense
Indexed 2786 threads (79% resolved)
Similar Threads
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.
Discussing Features for Typesense Cloud Dashboard
Stephano expressed the need for a Typesense Cloud dashboard to manage collections. Jason confirmed its development, also including features like editing and deleting items. James and Mica added comments about API key management and self-hosted Typesense compatibility.
Issue with Typesense Schema and Ruby Client
Mateo faces issues while creating a schema and using Ruby client for Typesense. Jason suggests using a new field instead of 'id' and provides assistance for Ruby client errors.
Deleting and Creating Documents in Typesense
Priyank asked for help with deleting and creating documents in Typesense and found the problem to be an issue with their own code. Jason offered support.
Slow Document Deletion in Typesense Database
Robert inquired about speeding up deletes in Typesense. Robert agreed to file a detailed bug report following the discussion with Kishore Nallan who is investigating a possible bug causing the delay in document deletion.