Clarifying Filter_by IDs in API Requests
TLDR Richard asked about deleting multiple documents by ID using filter_by=id: [id1, id2, id3]
. Jason clarified that it should be filter_by=id:=[1,2,3]
and recommended using :=
for exact matches.
1
Feb 14, 2023 (8 months ago)
Richard
05:49 PMfilter_by=id: [id1, id2, id3]
does that mean ?filter_by=id:1,2,3&batch_size=100
or ?filter_by=id:[1,2,3]&batch_size=100
Jason
06:08 PMfilter_by=id:=[1,2,3]
Jason
06:09 PM:=
instead of :
so it does an exact match and not a contains (word-level) when filteringRichard
06:10 PM1
Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Resolving Document Export & Batch Deletion Issues
Dui had trouble exporting a document and wanted batch deletion assistance. Kishore Nallan fixed the export issue, upgraded their cluster manually and suggested using `delete by query`.
Correct Formatting for Execute Batch Delete Commands
Nikunj encountered an error while executing a multiple delete command. Kishore Nallan helped correct the syntax and directed to relevant documentation.
Typesense Cloud Issue: Unable to Delete Documents by ID
Ellen had trouble using Typesense Cloud's `filter_by` option to delete documents by id. Jason solved this by suggesting to remove double-quotes around IDs in `filter_by` clause.