Logstash elasticsearch to csv pipeline issue - returns all the documents irrespective of the "size" parameter in the query

logstash elasticsearch to csv pipeline returns all the documents irrespective of the "size" parameter in the query.

I have set up elasticsearch to csv pipeline using logstash and it pulls all the docs into output file successfully. However it pulls all the documents in the elasticsearch index/type and ignores the size parameter specified in the query.

Here is my config file:

input {
elasticsearch {
hosts => ["hostname"]
index => "indexname"
query => '{
"from" : 0, "size" : 25,
"_source": {
"includes": [ "*"]

},
"query": {
"bool": {
"must": [
{"terms":{"fieldname": ["x","y"]}},
{"terms":{"_type":["doctype"]}}
]
}
}
}'
}}

output {
csv {
fields => ["a","b","c"]
path => "/usr/share/logstash/output.csv"
}
}

I am specifying size=25, however I get thousands of docs in the output file.

Any pointers please?

HI Guys - Any inputs on this please.

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