I want to delete many documents from elasticsearch that don't exist anymore on my database.
I know that to delete multiple documents (with ids 1,2,3 for example) we use :
curl -XDELETE localhost:9200/index/doc/ids=1,2,3
But I want to keep only those ids and delete the rest, it something like the following instruction in SQL.
DELETE FROM table1 WHERE id_column NOT IN (1,2,3);
Is there an equivalent of NOT IN in this case for elasticsearch?