#community-help

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.

Powered by Struct AI

1

4
8mo
Solved
Join the chat
Feb 14, 2023 (8 months ago)
Richard
Photo of md5-93b346c47af15ad3e25b4ae0850586d2
Richard
05:49 PM
docs state To delete multiple documents by ID, you can use filter_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
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:08 PM
It would be the latter: filter_by=id:=[1,2,3]
06:09
Jason
06:09 PM
Side note, I would recommend using := instead of : so it does an exact match and not a contains (word-level) when filtering
Richard
Photo of md5-93b346c47af15ad3e25b4ae0850586d2
Richard
06:10 PM
thanks!

1