Writing in the front
In the reproduction environment,we neet delet the data according to the ids.So we need branch query statement.
_delete_by_query
‘_delete_by_query’ used by post and this statement can help delete data by query.But I need delete with not include these id.So we can use ‘must_not’ and ‘ids’ query.
POST /cool-user-index/_delete_by_query
{
"query": {
"bool": {
"must_not": [
{
"ids": {
"values": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,29,30,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,58,59,60,61,63,64,75,76,77,78,79,80,81,82,83,84,85,86,100,101,102,103,104,105,106,107,110,111,129,134,135,136,140,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184]
}
}
]
}
}
}