# Logstash elastic search templete error

**URL:** <https://discuss.elastic.co/t/logstash-elastic-search-templete-error/173404>\
**Category:** Logstash\
**Created:** [March 21, 2019, 9:31pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-templete-error/173404 "2019-03-21T21:31:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lokesh\_Reddy](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@Lokesh\_Reddy](https://discuss.elastic.co/u/Lokesh_Reddy)\
**Post date:** [March 21, 2019, 9:31pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-templete-error/173404/1 "2019-03-21T21:31:47Z")

</div>

Hello,  
I am collecting data from twitter,  
I have found something online and I was keep on trying to get twitter data into elastic search  
finally I have found we need to use the templete.

I have used this templete  
`{ "index_patterns": "twitter", "settings": { "number_of_shards": 1, "number_of_replicas": 0, "mapping": { "total_fields": { "limit": "10000" } } }, "mappings": { "tweets": { "properties": { "@timestamp": { "type": "date", "format": "dateOptionalTime" }, "text": { "type": "text" }, "user": { "type": "object", "properties": { "description": { "type": "text" } } }, "coordinates": { "type": "object", "properties": { "coordinates": { "type": "geo_point" } } }, "entities": { "type": "object", "properties": { "hashtags": { "type": "object", "properties": { "text": { "type": "text", "fielddata": true } } } } }, "retweeted_status": { "type": "object", "properties": { "text": { "type": "text" } } } }, "dynamic_templates": [{ "string_template": { "match": "*", "match_mapping_type": "string", "mapping": { "type": "keyword" } } }] } } }`

and this is my logstash configuration file

`input { twitter { consumer_key => "e3IiLKMJ7BbFb6cqjvkDgVMRw" consumer_secret => "C0w4IziMLZgI4nS0BrGxnjgQGNkPMnGcxEhtRecll94hIhGoXY" oauth_token => "3610593134-ncC8uCwMezcREpOjngkVS0j8kkD0XqFQNAe5ZFk" oauth_token_secret => "R8RCGZaQTcBIy7ioKKJ2Mr8hVBgFM0bsOUlMxR1soDmXj" keywords => ["trump", "india", "IAS", "pulwama"] full_tweet => true ignore_retweets => true } } output { stdout { codec => rubydebug } elasticsearch { hosts => "10.10.0.11:9200" index => "twitterbeat-%{+YYYY.MM.dd}" document_type => "doc" template => "/etc/logstash/conf.d/twitter_template2.json" template_name => "twitter" template_overwrite => true } }`

They are not getting segregating into fields  
and there is another template file I found online I'll attach it below.

can some help me or share me a template for Twitter and get the geo coordinates

---

<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:** [April 18, 2019, 9:33pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-templete-error/173404/4 "2019-04-18T21:33:10Z")

</div>

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