# Logstash elasticsearch input with \_source disabled

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034>\
**Category:** Logstash\
**Created:** [October 17, 2019, 11:18am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034 "2019-10-17T11:18:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raviep](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@raviep](https://discuss.elastic.co/u/raviep)\
**Post date:** [October 17, 2019, 11:18am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034/1 "2019-10-17T11:18:51Z")

</div>

Hi,

I'm using logstash elastic search input plugin to export elastic search indexes into csv file. Please note that \_source is disabled for indices. The issue here is export works only when \_source is enabled otherwise it doesn't work.

So how to export indices when \_source field is disabled, I tried using \_source as false to the query and tried adding stored\_fields but it doesn't work.

Could you please help me in this case?

Here is my logstash config file,

input{  
elasticsearch{  
hosts =\> "localhost:9200"  
index =\> "indexname"  
query =\> '{"query": {"match\_all": {}}}'  
}  
}  
output{  
csv{  
fields =\> ["field1","field2"]  
path =\> "/usr/share/logstash/tmp/csv-export1.csv"  
}  
stdout{codec =\> json}  
}

Thanks,  
Ravi

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 17, 2019, 11:32am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034/2 "2019-10-17T11:32:22Z")

</div>

You can not export if source is disabled. That is one of the drawbacks of disabling the source field.

---

<div class="post-metadata">

**Author:** ![raviep](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@raviep](https://discuss.elastic.co/u/raviep)\
**Post date:** [October 17, 2019, 12:24pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034/3 "2019-10-17T12:24:49Z")

</div>

Thanks for your answer, but I'm able to see results using curl command by specifying stored\_fields. Is to possible to mention stored\_fields in elasticsearch input plugin or with \_source=false?

---

<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:** [November 14, 2019, 12:24pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-with-source-disabled/204034/4 "2019-11-14T12:24:51Z")

</div>

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