Iam trying to delete the oldest document in the alias by using sort ,but this deletes all the documents that matches the query.
Is sort not supported by delete by query? Is there any other option to use in the delete by query by not using sort?
{
"query": {
"match": {
"id":"101"
}
},
"size": 1,
"sort": [
{
"dateField": {
"order": "asc"
}
}
]
}