Sort doesn't work with delete by query

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": {
  "size": 1,
  "sort": [
      "dateField": {
        "order": "asc"

In the documentation, it shows that sort is supported. But not size.

Instead you need to use: max_docs.

Thanks @dadoonet

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.