# Mapping for geo\_point-usage not working with twitter input

**URL:** <https://discuss.elastic.co/t/mapping-for-geo-point-usage-not-working-with-twitter-input/24545>\
**Category:** Logstash\
**Created:** [June 29, 2015, 12:15pm UTC](https://discuss.elastic.co/t/mapping-for-geo-point-usage-not-working-with-twitter-input/24545 "2015-06-29T12:15:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominikmueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dominikmueller/32/3499_2.png) [@dominikmueller](https://discuss.elastic.co/u/dominikmueller)\
**Post date:** [June 29, 2015, 12:15pm UTC](https://discuss.elastic.co/t/mapping-for-geo-point-usage-not-working-with-twitter-input/24545/1 "2015-06-29T12:15:55Z")

</div>

Hi guys,

i set up elasticsearch with kibana and logstash and i would like to analyze some Tweets with it.

Currently my configuration looks like this:

```
    input {
  twitter {
    consumer_key => mykey
    consumer_secret => mysecret
    keywords => ["#weather"]
    oauth_token => "mytoken"
    oauth_token_secret => "mytokensecret"
    full_tweet => true
  }
}

output {
  elasticsearch {
    host => localhost
    index => "twitter-weather"
    document_type => "tweet"
    template => "twitter_template.json"
    template_name => "twitter"
  }
}

```

and my twitter\_template looks like this:

```
    {
  "template": "twitter",
  "order": 1,
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "tweet": {
      "_all": {
        "enabled": false
      },
      "dynamic_templates" : [ {
         "message_field" : {
           "match" : "message",
           "match_mapping_type" : "string",
           "mapping" : {
             "type" : "string", "index" : "analyzed", "omit_norms" : true
           }
         }
       }, {
         "string_fields" : {
           "match" : "*",
           "match_mapping_type" : "string",
           "mapping" : {
             "type" : "string", "index" : "analyzed", "omit_norms" : true,
               "fields" : {
                 "raw" : {"type": "string", "index" : "not_analyzed", "ignore_above" : 256}
               }
           }
         }
       } ],
      "properties": {
        "text": {
          "type": "string"
        },
        "coordinates": {
          "type": "string"
          "properties": {
            "coordinates": {
              "type": "geo_point"
            }
          }
        }
      },
      "properties": {
        "text": {
          "type": "string"
        },
        "geo": {
          "properties": {
            "type": "string"
          },
          "coordinates": {
            "type": "geo_point"
          }
        }
      }
    }
  }
}

```

The coordinates are located as array in coordinates.coordinates

Example:

```
   "geo": {
  "type": "Point",
  "coordinates": [
    29.875016,
    -92.218675
  ]
},
"coordinates": {
  "type": "Point",
  "coordinates": [
    -92.218675,
    29.875016
  ]
},

```

Anyway i can't use them with a pile map.

Can anyone help me? I would appreciate every help! 😄

Sincerely yours  
Dominik Müller

---

<div class="post-metadata">

**Author:** ![andresmmujica](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@andresmmujica](https://discuss.elastic.co/u/andresmmujica)\
**Post date:** [October 12, 2015, 5:58pm UTC](https://discuss.elastic.co/t/mapping-for-geo-point-usage-not-working-with-twitter-input/24545/2 "2015-10-12T17:58:12Z")

</div>

having same issue here... working on that. did you solve it?

==== I just solved it!

try creating a new template changing the mapping to geoip\_point

in /etc/logstash/conf.d/twitter.conf

```
    manage_template => true
    template => "/etc/logstash/templates/twitter_template.json"
    template_name => "twd"

```

in twitter\_template.json :

"properties" : {  
"@version": { "type": "string", "index": "not\_analyzed" },  
"coordinates" : {  
"type" : "object",  
"dynamic": true,  
"properties" : {  
"coordinates" : { "type" : "geo\_point" }  
}

use the elastisearch-template.json as a base.

---

<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:** [July 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/mapping-for-geo-point-usage-not-working-with-twitter-input/24545/3 "2017-07-06T05:26:49Z")

</div>


