Elastic search size parameter ignored if put in query string in delete_by_query


(Harshit Bansal) #1

The following query deletes all the data which meet the query criteria and ignores the size parameter in elastic search version 6.2 .This works as expected(only deletes maximum 20 items) in elastic search version 5.5.

GET index/type/delete_by_query
{
  "size" : "20", 
  "query": {
        "range" : {
            "Time" : {
                "lt": "now-16d"
            }
        }
  }
}

If I pass the size parameter in URI itself , then it works as expected. This works fine and only deletes maximum 20 items.

GET index/type/delete_by_query?size=20
{

  "query": {
        "range" : {
            "Time" : {
                "lt": "now-16d"
            }
        }
  }
}

(system) #2

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