# Import json files to elasticsearch using logstash

**URL:** <https://discuss.elastic.co/t/import-json-files-to-elasticsearch-using-logstash/165608>\
**Category:** Logstash\
**Created:** [January 24, 2019, 1:08pm UTC](https://discuss.elastic.co/t/import-json-files-to-elasticsearch-using-logstash/165608 "2019-01-24T13:08:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsron143](https://avatars.discourse-cdn.com/v4/letter/i/a6a055/32.png) [@itsron143](https://discuss.elastic.co/u/itsron143)\
**Post date:** [January 24, 2019, 1:08pm UTC](https://discuss.elastic.co/t/import-json-files-to-elasticsearch-using-logstash/165608/1 "2019-01-24T13:08:11Z")

</div>

i have around 300000 `json` files in a single folder and I want to index them to elasticsearch. How do I do this using the `bulk` api efficiently or How do I use logstash to pass the folder name as file input plugin, json as codec and elasticsearch as output?  
Please tell me what is the fastest way to index the files to es 5.6

---

<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:** [February 21, 2019, 1:13pm UTC](https://discuss.elastic.co/t/import-json-files-to-elasticsearch-using-logstash/165608/2 "2019-02-21T13:13:47Z")

</div>

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