How do I delete data from elasticsearch within a Range?

Hi!

Read about Delete by Query. Try this:

POST teste/_delete_by_query
{
  "query": {
    "range": {
      "field_date": {
        "lt": "2022-05-06",
        "gt": "2022-05-01"
      }
    }
  }
}
2 Likes