# Configuration File Sorting results

**URL:** <https://discuss.elastic.co/t/configuration-file-sorting-results/131499>\
**Category:** Logstash\
**Created:** [May 11, 2018, 3:07pm UTC](https://discuss.elastic.co/t/configuration-file-sorting-results/131499 "2018-05-11T15:07:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![npontes](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@npontes](https://discuss.elastic.co/u/npontes)\
**Post date:** [May 11, 2018, 3:07pm UTC](https://discuss.elastic.co/t/configuration-file-sorting-results/131499/1 "2018-05-11T15:07:58Z")

</div>

Hello,

I'm new in elastic, I'm currently using Logstash 2.1.1 to retrieve data from ElasticSearch 1.4.4 to a CSV. I'm using the following configuration:

input {  
elasticsearch {  
hosts =\> "host"  
index =\> "index"  
scroll =\> "1m"  
query =\> '{"query": {"bool":{"must":[{"match\_all":{}}],"must\_not":[],"should":[]}},"sort": ["objectId"]}'  
}  
}

output {  
csv {  
path =\> "output\_Int.csv"  
fields =\> ["objectId","name"]  
}  
}

How can I sort by objectId? Using this conf file I can't do it. Any suggestion?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 8, 2018, 3:18pm UTC](https://discuss.elastic.co/t/configuration-file-sorting-results/131499/2 "2018-06-08T15:18:54Z")

</div>

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