Mojan
06/20/2023, 10:47 PMGustavo
06/20/2023, 10:53 PMfilter_by=id:!=[id1,id2,id3]
does what you need, but try it with caution, I'm not 100% sureMojan
06/20/2023, 11:17 PMdoc_ids
. Do you know how I would place the list name in there ? Because, I can't certainly put that inside quotes.
Do you know how I can do that without quotes ?Gustavo
06/20/2023, 11:31 PMMojan
06/20/2023, 11:36 PM{'filter_by': f"doc_id: != {doc_ids}"}
and it worked !
Thank you for your help :)Ed
06/21/2023, 9:02 AMEd
06/21/2023, 9:02 AMMojan
06/21/2023, 9:12 PMclient.collections[table_name].documents.delete({'filter_by': f"{col_name}: != {id_list}"})
table_name
is the name of the db table which is the same as index name here, column_name
is the name of the field , which in this case is doc_id
and id_list
is the list which is being fed to the function .