Closed
Description
Elasticsearch version (bin/elasticsearch --version
):6.x
Description of the problem including expected versus actual behavior:
Steps to reproduce:
testing the "size" parameter inside the json request
post twitter/doc/1
{
"message":"hello1",
"num":2
}
post twitter/doc/2
{
"message":"hello2",
"num":1
}
post twitter/doc/3
{
"message":"hello",
"num":2
}
post twitter/doc/4
{
"message":"hello",
"num":2
}
get twitter/_search
POST twitter/_delete_by_query
{
"query": {
"bool": {
"must": [
{
"script": {
"script": {
"lang": "expression",
"source": """doc["num"].value ==2"""
}
}
}
]
}
}
, "size":2
}
The get twitter/_search returns 2 docs after the delete_by_query call was executed in ES 5.6.x versions.
But it will return 1 doc after the call in 6.x (random testing on 6.0.0, 6.4, 6.5 ), it seems that the "size" param is ignored in the call, the delete_by_query will remove 3 docs instead of 2.
If we add "size" as a query string param then the delete_by_query will delete 2 docs on all versions tested.
POST twitter/_delete_by_query?size=2
{
"query": {
"bool": {
"must": [
{
"script": {
"script": {
"lang": "expression",
"source": """doc["num"].value ==2"""
}
}
}
]
}
}
}
Has this option been removed starting 6.x?
Was not able to find any of these changes in the es docs as well.