# Can't add txt files to elastic search

**URL:** <https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699>\
**Category:** Logstash\
**Created:** [October 4, 2017, 12:36pm UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699 "2017-10-04T12:36:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OsymandiasII](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@OsymandiasII](https://discuss.elastic.co/u/OsymandiasII)\
**Post date:** [October 4, 2017, 12:36pm UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699/1 "2017-10-04T12:36:01Z")

</div>

hi  
I want to index txt in elastic search with Logstash.  
the problem is that logstash do not recognise the index i'm using.  
I m quite new to ELK so maybe the solution is simple.

this is my config file :

input {  
file {  
path =\> ["/Users/timothemalandain/Downloads/logstash-5.6.2/UserData/MainTitles.txt"]  
start\_position =\> "beginning"  
}

}  
output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "titles"  
document\_type =\> "titles"  
}  
stdout {}  
}

When i want to add the index in Kibana i have "Unable to fetch mapping. Do you have indices matching the pattern?"

What am i not doing/doing wrong ?  
thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 6, 2017, 5:35am UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699/2 "2017-10-06T05:35:17Z")

</div>

> [@OsymandiasII](#):
>
> When i want to add the index in Kibana i have "Unable to fetch mapping. Do you have indices matching the pattern?"

What are you putting in the index pattern field?

---

<div class="post-metadata">

**Author:** ![OsymandiasII](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@OsymandiasII](https://discuss.elastic.co/u/OsymandiasII)\
**Post date:** [October 6, 2017, 10:15am UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699/3 "2017-10-06T10:15:27Z")

</div>

thanks for your reply

Well in my config file i've chosen "titles" as the index  
So i put "titles" in the index in Kibana .  
Do i need to create "titles" like that in console : Put /titles  
before, because i tried it an didn't work.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 6, 2017, 8:24pm UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699/4 "2017-10-06T20:24:31Z")

</div>

When you run Logstash does it show anything in stdout?

---

<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 3, 2017, 8:24pm UTC](https://discuss.elastic.co/t/cant-add-txt-files-to-elastic-search/102699/5 "2017-11-03T20:24:32Z")

</div>

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