Delete_by_query returns empty

I try to delete the old records in my index, but the delete_by_query returns empty to me. I have a lot of data in the index, it should not be zero. Please help me to check where the problem is. Thank you!
Here is my curl:

 curl -X POST -k -u ueser:changeme "https://localhost:9200/index_01/_delete_by_query?pretty" -H 'Content-Type: application/json' -d'
{
    "query": {
        "range": {
            "@timestamp": {
                "lt": "now-3d"
            }
        }
    }
}'

And this is the result:

{
  "took" : 1,
  "timed_out" : false,
  "total" : 0,
  "deleted" : 0,
  "batches" : 0,
  "version_conflicts" : 0,
  "noops" : 0,
  "retries" : {
    "bulk" : 0,
    "search" : 0
  },
  "throttled_millis" : 0,
  "requests_per_second" : -1.0,
  "throttled_until_millis" : 0,
  "failures" : [ ]
}

I found out the problem by myself.
My mapping does not have @ before timestamp.

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