Elasticsearch input plugin size

I was trying with different queries like this

query => '{
"query": {
"bool": {
"filter": [
{
"terms": {
"enviroment": [
"pre"
]
}
}
]
}
},
"size": 100
}'

This DSL query return results, but not 100 as i said on the size, this query return more than 100 results.
It seems that the size field does not work as indicated in the beginning of the topic