# Geo-Point Mapping

**URL:** <https://discuss.elastic.co/t/geo-point-mapping/269504>\
**Category:** Elasticsearch\
**Created:** [April 7, 2021, 5:42pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504 "2021-04-07T17:42:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 7, 2021, 5:42pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/1 "2021-04-07T17:42:51Z")

</div>

```
mutate {
    add_field => {
      "location" => ["%{[location_lat]}","%{[location_lon]}"]
    }
  }

```

This is my mutate field in my conf file to create my geopoint mapping of the location\_lat and location\_lon value in the data. However, the value that is being created is simply strings with location\_lon . I attempted to use this mapping but am confused when and where in Kibana I should utilize it.

```
PUT mongo_log_data
{
  "mappings": {
    "my_type": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}
```

---

<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:** [April 7, 2021, 10:22pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/2 "2021-04-07T22:22:37Z")

</div>

> [@caitlyn.carlisle](#):
>
> I attempted to use this mapping but am confused when and where in Kibana I should utilize it.

In Dev Tools, you need to run that before you put data into the index though. It's not a retrospective change.

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 4:02am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/3 "2021-04-08T04:02:14Z")

</div>

Thank you!

```
filter {
mutate {
copy => { "_id" => "[@metadata][_id]"}
}
mutate{
    remove_field => ["_id"]
}
mutate{
    remove_field => ["image_url"]
}
mutate{
    remove_field => ["maintext"]
}

mutate {
    add_field => {
      "location" => ["%{[location_lat]}","%{[location_lon]}"]
    }
  }
}

```

I have this filter present in my logstash file but when I use this mapping, none of my data goes through. It is correctly processing the location as a geo point but no data is going through. I attempted to switch the date filter in Kibana but it still was empty. My logs are seemingly going through but I am not sure what I am doing incorrectly within this mapping.

```
PUT mongo_log_data
{
  "mappings": {
      "properties": { 
      "location": {
          "type": "geo_point"
        }
      }
    }
  }
```

---

<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:** [April 8, 2021, 4:18am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/4 "2021-04-08T04:18:37Z")

</div>

> [@caitlyn.carlisle](#):
>
> I have this filter present in my logstash file but when I use this mapping, none of my data goes through. It is correctly processing the location as a geo point but no data is going through.

I am not sure what you mean by this.

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 4:35am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/5 "2021-04-08T04:35:53Z")

</div>

Does the mapping overwrite anything that I have in the logstash-conf file? I want all of those values from the conf file to be present and converted in that way but even my date\_publish field has no values when I run this pipeline.

---

<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:** [April 8, 2021, 4:36am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/6 "2021-04-08T04:36:55Z")

</div>

The mapping is applied to Elasticsearch, not to Logstash.

If things are not working as you expect, it'd be helpful to provide more information. Configs, sample logs, mappings etc etc.

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 5:08am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/8 "2021-04-08T05:08:14Z")

</div>

I am able to utilize the logstash pipeline to import the data from MongoDB into the index mongo\_log\_data. Should I also use PUT mongo\_log\_data into the mapping if I want to set up the geo\_point coordinates from the mongo\_log\_data index but want to maintain all of the automatically populated fields from the Logstash?

---

<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:** [April 8, 2021, 5:57am UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/9 "2021-04-08T05:57:52Z")

</div>

> [@caitlyn.carlisle](#):
>
> Should I also use PUT mongo\_log\_data into the mapping if I want to set up the geo\_point coordinates from the mongo\_log\_data index but want to maintain all of the automatically populated fields from the Logstash?

Yes. You need to put the mapping into Elasticsearch _before_ you send the data from Logstash to Elasticsearch.

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 6:59pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/10 "2021-04-08T18:59:36Z")

</div>

Thank you! When I don't use the mapping before I run the Logstash, I am able to get the data through to Kibana. However, when I do use the mapping and then run the Logstash, the location value is correct but none of my data is visible in Kibana and I am expanding the date range.

 ![Screen Shot 2021-04-08 at 3.00.41 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/d/6d336c80b8cefaf48b8113fd9814b89d8c1492ad.jpeg)

I am getting this error for some of the documents but the ones that do not have this error are still not visible.

`[2021-04-08T14:55:28,221][WARN][logstash.outputs.elasticsearch][main][ed6b6e6684787676524231407cc67cc26fdbbcbbf2d12a6024f121ffe25d7c79] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"mongo_log_data", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x41099155>], :response=>{"index"=>{"_index"=>"mongo_log_data", "_type"=>"_doc", "_id"=>"DDHWsngBjzCHtQZt15dw", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"unsupported symbol [%] in geohash [%{[location_lat]}]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"unsupported symbol [%] in geohash [%{[location_lat]}]"}}}}}}`

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 8, 2021, 7:26pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/11 "2021-04-08T19:26:00Z")

</div>

Hi @caitlyn.carlisle

This is incorrect syntax...

> [@caitlyn.carlisle](#):
>
> ```auto
> mutate {
> add_field => {
> "location" => ["%{[location_lat]}","%{[location_lon]}"]
> }
> }
> 
> ```

Perhaps try something like ...

This is the correct of above you have extra `[]`s in the right side

```
  add_field => {
     "location" => ["%{location_lat}","%{location_lon}"]
}

```

or

```
    rename => {
        "location_lon" => "[location][lon]"
        "location_lat" => "[location][lat]"
    }

```

or

```
    copy => {
        "location_lon" => "[location][lon]"
        "location_lat" => "[location][lat]"
    }

```

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 8:56pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/12 "2021-04-08T20:56:43Z")

</div>

Thank you!

I implemented the first change but still got this error:

`[2021-04-08T16:54:10,236][WARN][logstash.outputs.elasticsearch][main][4ac1613603270b4eb26d5bbe0db2493e553a6a82019df81e86c19a58e579d342] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"mongo_log_data", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x7af918bc>], :response=>{"index"=>{"_index"=>"mongo_log_data", "_type"=>"_doc", "_id"=>"BPxDs3gBEV6jPE3FheCw", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [location] of type [geo_point]", "caused_by"=>{"type"=>"parse_exception", "reason"=>"unsupported symbol [%] in geohash [%{location_lat}]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"unsupported symbol [%] in geohash [%{location_lat}]"}}}}}}`

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 8:59pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/13 "2021-04-08T20:59:11Z")

</div>

Could there be something wrong with my mapping? I was able to get the pipeline to work with the initial code, even with the inaccurate code, it just wasn't working once I used this mapping?

```
PUT mongo_log_data
{
  "mappings": {
  "properties": { 
  "location": {
      "type": "geo_point"
    },
    
  "date_publish": {
      "type": "date"
    },
    
  "title": {
      "type": "keyword"
    },
    
  "url": {
      "type": "keyword"
    },
  
  "civic1_event_type": {
      "type": "keyword"
    },
    
  "RAI_event_type": {
      "type": "keyword"
    }
}
  }
}
```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 8, 2021, 9:28pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/14 "2021-04-08T21:28:10Z")

</div>

The mapping looks good

Can you please post your entire logstash conf file exactly how it is we'll take a look. That error still indicates a syntax error so something's not right.

What do your lat and long Fields look like can you show a ruby debug output so we can see?

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 10:08pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/15 "2021-04-08T22:08:28Z")

</div>

```
input {
mongodb {
    uri => 'mongodb://caitc:k123%21@1527017/ml4p?authSource=ml4p&readPreference=primary&ssl=false'
    placeholder_db_dir => '/Users/caitlyncarlisle/desktop/logstash-7.12.0/bin'
    placeholder_db_name => 'logstash_sqlite.db'
    collection => 'articles-2012-1'
    batch_size => 5000
}

```

}  
filter {  
mutate {  
copy =\> { "\_id" =\> "[@metadata][\_id]"}  
}

mutate{  
remove\_field =\> ["\_id"]  
}

mutate{  
remove\_field =\> ["image\_url"]  
}

mutate{  
remove\_field =\> ["maintext"]  
}

mutate {  
convert =\> { "civic1\_event\_type" =\> "string" }  
}

mutate {  
convert =\> { "RAI\_event\_type" =\> "string" }  
}

mutate {  
add\_field =\> {  
"location" =\> ["%{[location\_lat]}","%{[location\_lon]}"]  
}  
}

}  
output {  
stdout {  
codec =\> rubydebug  
}  
elasticsearch {  
action =\> "index"  
index =\> "mongo\_log\_data"  
hosts =\> ["localhost:9200"]  
}  
}

And here is an example:

```
{
                           "civic1_model_outputs_legalaction" => 10.96875,
                                             "RAI_event_type" => "-999",
                     "RAI_model_outputs_security_cooperation" => 3.552734375,
                                                   "language" => "en",
                                                  "title_rss" => "NULL",
                                "civic1_model_outputs_arrest" => -1.2744140625,
                        "civic1_model_outputs_defamationcase" => -0.0156707763671875,
                                                "date_modify" => "2021-02-10T06:36:39Z",
                                               "date_publish" => "2012-11-15T21:37:48Z",
                                          "civic1_event_type" => "legalaction",
              "RAI_model_outputs_bribery_economic_corruption" => 2.123046875,
                      "civic1_model_outputs_mobilizesecurity" => -0.312255859375,
                                        "language_translated" => "en",
                                        "maintext_translated" => "Secretary of State Hillary Clinton ion.\n(AFP)\nDaily newsletterReceive essential international news every morning Subscribe",
                                "civic1_model_outputs_censor" => -0.237060546875,
                        "civic1_model_outputs_violencelethal" => -0.07086181640625,
                           "civic1_model_outputs_changepower" => -0.67138671875,
                         "RAI_model_outputs_diplomatic_visit" => 1.37890625,
                             "RAI_model_outputs_surveillance" => -0.447265625,
                  "RAI_model_outputs_economic_aid_assistance" => -0.55908203125,
            "RAI_model_outputs_joint_security_force_exercise" => 0.07330322265625,
                                                       "host" => "Caitlyns-MBP.lan",
                 "RAI_model_outputs_trade_agreement_exchange" => -2.58984375,
                                                        "url" => "https://www.france24.com/en/20121115-clinton-testify-benghazi-attack-republicans",
         "RAI_model_outputs_intelligence_counterintelligence" => 3.244140625,
        "RAI_model_outputs_social_academic_cultural_activity" => -0.02435302734375,
              "RAI_model_outputs_media_campaign_intervention" => 0.056610107421875,
                 "RAI_model_outputs_trade_financial_sanction" => -1.279296875,
                      "RAI_model_outputs_diaspora_activation" => 0.1064453125,
                                                  "log_entry" => "{\"_id\"=>BSON::ObjectId('60237ef801e920023bd60068'), \"authors\"=>[\"News Wires\"], \"date_download\"=>2021-02-10 06:36:39 UTC, \"date_modify\"=>2021-02-10 06:36:39 UTC, \"date_publish\"=>2012-11-15 21:37:48 UTC, \"description\"=>\"Secretary of State Hillary Clinton agreed to testify in hearings on the September attack on the US mission in Benghazi, Libya on Thursday, as Republicans continued to fuel a feud over the handling of…\", \"filename\"=>\"en_20121115-clinton-testify-benghazi-attack-republicans_1612938999.html\", \"image_url\"=>\"https://s.france24.com/media/display/1eb82d40-09e0-11e9-ac2f-005056bff430/w:1280/p:16x9/clinton_24.jpg\", \"language\"=>\"en\", \"title\"=>\"Clinton to testify in Benghazi attack probe\", \"title_page\"=>\"Clinton to testify in Benghazi attack probe\", \"title_rss\"=>\"NULL\", \"source_domain\"=>\"france24.com\", \"maintext\"=>\"Secretary of State Hillary Clinton Subscribe\", \"url\"=>\"https://www.france24.com/en/20121115-clinton-testify-benghazi-attack-republicans\", \"event_extracted\"=>0, \"include\"=>true, \"language_translated\"=>\"en\", \"maintext_translated\"=>\"Secretary of State Hillary Clinton ...\", \"title_translated\"=>\"Clinton to testify in Benghazi attack probe\", \"mordecai_locations\"=>{\"LBY\"=>[\"Benghazi\", \"Libya\"]}, \"civic1\"=>{\"event_type\"=>\"legalaction\", \"model_outputs\"=>{\"arrest\"=>-1.2744140625, \"censor\"=>-0.237060546875, \"changeelection\"=>-0.303466796875, \"changepower\"=>-0.67138671875, \"cooperate\"=>-0.673828125, \"coup\"=>-0.56640625, \"defamationcase\"=>-0.0156707763671875, \"disaster\"=>-0.342529296875, \"legalaction\"=>10.96875, \"legalchange\"=>-0.52587890625, \"martiallaw\"=>-0.97216796875, \"mobilizesecurity\"=>-0.312255859375, \"praise\"=>-1.857421875, \"protest\"=>-0.671875, \"purge\"=>-0.5283203125, \"raid\"=>0.006866455078125, \"threaten\"=>0.01409912109375, \"violencelethal\"=>-0.07086181640625, \"violencenonlethal\"=>-1.3564453125}}, \"month\"=>11, \"year\"=>2012, \"RAI\"=>{\"event_type\"=>\"-999\", \"model_outputs\"=>{\"-999\"=>-0.322265625, \"arms_transfer_security_aid_assistance\"=>-0.76171875, \"bribery_economic_corruption\"=>2.123046875, \"diaspora_activation\"=>0.1064453125, \"diplomatic_mediation\"=>1.263671875, \"diplomatic_recognition\"=>-1.4140625, \"diplomatic_sanction\"=>-0.50341796875, \"diplomatic_statement\"=>1.373046875, \"diplomatic_visit\"=>1.37890625, \"economic_aid_assistance\"=>-0.55908203125, \"intelligence_counterintelligence\"=>3.244140625, \"investment\"=>-0.25146484375, \"joint_security_force_exercise\"=>0.07330322265625, \"media_campaign_intervention\"=>0.056610107421875, \"social_academic_cultural_activity\"=>-0.02435302734375, \"political_process_policy_intervention\"=>0.48828125, \"professional_cultural_exchange\"=>-0.274658203125, \"security_cooperation\"=>3.552734375, \"security_force_facility_presence\"=>-0.26416015625, \"official_security_force_facility_presence\"=>-0.57958984375, \"surveillance\"=>-0.447265625, \"tech_transfer_investment\"=>1.078125, \"trade_agreement_exchange\"=>-2.58984375, \"trade_financial_sanction\"=>-1.279296875, \"transnational_organization_crime\"=>-1.1494140625}}}",
                                  "civic1_model_outputs_coup" => -0.56640625,
         "RAI_model_outputs_security_force_facility_presence" => -0.26416015625,
                                 "civic1_model_outputs_purge" => -0.5283203125,
    "RAI_model_outputs_arms_transfer_security_aid_assistance" => -0.76171875,
                           "civic1_model_outputs_legalchange" => -0.52587890625,
                                                   "@version" => "1",
                     "RAI_model_outputs_diplomatic_statement" => 1.373046875,
                            "civic1_model_outputs_martiallaw" => -0.97216796875,
           "RAI_model_outputs_professional_cultural_exchange" => -0.274658203125,
                     "civic1_model_outputs_violencenonlethal" => -1.3564453125,
                               "civic1_model_outputs_protest" => -0.671875,
                                  "civic1_model_outputs_raid" => 0.006866455078125,
                                              "source_domain" => "france24.com",
                              "civic1_model_outputs_disaster" => -0.342529296875,
"RAI_model_outputs_official_security_force_facility_presence" => -0.57958984375,
                                                   "filename" => "en_20121115-clinton-testify-benghazi-attack-republicans_1612938999.html",
                                                       "year" => 2012,
                                "civic1_model_outputs_praise" => -1.857421875,
    "RAI_model_outputs_political_process_policy_intervention" => 0.48828125,
         "RAI_model_outputs_transnational_organization_crime" => -1.1494140625,
                                            "event_extracted" => 0,
                                                 "@timestamp" => 2021-04-08T22:02:43.766Z,
                        "civic1_model_outputs_changeelection" => -0.303466796875,
                              "civic1_model_outputs_threaten" => 0.01409912109375,
                                                      "month" => 11,
                                                   "location" => [
    [0] "%{[location_lat]}",
    [1] "%{[location_lon]}"
],
                     "RAI_model_outputs_diplomatic_mediation" => 1.263671875,
                                     "RAI_model_outputs_-999" => -0.322265625,
                               "RAI_model_outputs_investment" => -0.25146484375,
                                              "date_download" => "2021-02-10T06:36:39Z",
                                                 "title_page" => "Clinton to testify in Benghazi attack probe",
                                                    "logdate" => "2021-02-10T06:36:40+00:00",
                             "civic1_model_outputs_cooperate" => -0.673828125,
                 "RAI_model_outputs_tech_transfer_investment" => 1.078125,
                                                   "mongo_id" => "60237ef801e920023bd60068",
                                                "description" => "Secretary of State Hillary Clinton agreed to testify in hearings on the September attack on the US mission in Benghazi, Libya on Thursday, as Republicans continued to fuel a feud over the handling of…",
                                           "title_translated" => "Clinton to testify in Benghazi attack probe",
                   "RAI_model_outputs_diplomatic_recognition" => -1.4140625,
                      "RAI_model_outputs_diplomatic_sanction" => -0.50341796875,
                                                      "title" => "Clinton to testify in Benghazi attack probe"

```

}

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 10:17pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/16 "2021-04-08T22:17:35Z")

</div>

> [@caitlyn.carlisle](#):
>
> `en_20121115-clinton-testify-benghazi-attack-republicans`

However when I run it without the mapping, I am able to get this in another example

```
{
                                                 "@timestamp" => 2021-04-08T22:13:17.262Z,
                        "civic1_model_outputs_changeelection" => -1.294921875,
                                               "location_lat" => 55.378051,
                                                  "log_entry" => "{\"_id\"=>BSON::ObjectId('60237f3e8cc71d1e208c9a2a'), \"authors\"=>[], \"date_download\"=>2021-02-10 06:37:49 UTC, \"date_modify\"=>2021-02-10 06:37:49 UTC, \"date_publish\"=>2012-11-26 15:48:38 UTC, \"description\"=>\"Advice on how you can protect your home or business from flooding, and limit the damage to your property.\", \"filename\"=>\"news_science-environment-20497598_1612939069.html\", \"image_url\"=>\"https://ichef.bbci.co.uk/news/1024/media/images/64390000/jpg/_64390370_floodhomepa.jpg\", \"language\"=>\"en\", \"title\"=>\"UK floods: How can you protect your home or business?\", \"title_page\"=>\"UK floods: How can you protect your home or business? - BBC News\", \"title_rss\"=>\"NULL\", \"source_domain\"=>\"bbc.com\", \"maintext\"=>\"UK floods: How can you protect your home or business? Published 26 November 2012\\nimage caption People, on average, have to wait up to nine months before they can return to their flood-damaged homes\\nMore than five-and-a-half millioed for your area.\", \"title_translated\"=>\"UK floods: How can you protect your home or business?\", \"mordecai_locations\"=>{\"GBR\"=>[\"United Kingdom of Great Britain and Northern Ireland\"]}, \"civic1\"=>{\"event_type\"=>\"disaster\", \"model_outputs\"=>{\"arrest\"=>-0.97900390625, \"censor\"=>-0.3583984375, \"changeelection\"=>-1.294921875, \"changepower\"=>-0.002994537353515625, \"cooperate\"=>-0.434814453125, \"coup\"=>-0.3828125, \"defamationcase\"=>-0.26025390625, \"disaster\"=>11.6015625, \"legalaction\"=>-0.489990234375, \"legalchange\"=>-1.2109375, \"martiallaw\"=>0.1685791015625, \"mobilizesecurity\"=>-1.3720703125, \"praise\"=>-0.833984375, \"protest\"=>-0.6376953125, \"purge\"=>-0.53662109375, \"raid\"=>-0.650390625, \"threaten\"=>0.1649169921875, \"violencelethal\"=>-0.0216827392578125, \"violencenonlethal\"=>-0.019256591796875}}, \"month\"=>11, \"year\"=>2012, \"RAI\"=>{\"event_type\"=>\"-999\", \"model_outputs\"=>{\"-999\"=>-0.5390625, \"arms_transfer_security_aid_assistance\"=>-1.603515625, \"bribery_economic_corruption\"=>-0.3955078125, \"diaspora_activation\"=>-0.0677490234375, \"diplomatic_mediation\"=>-0.71142578125, \"diplomatic_recognition\"=>-2.3828125, \"diplomatic_sanction\"=>-0.81982421875, \"diplomatic_statement\"=>3.83984375, \"diplomatic_visit\"=>-0.61865234375, \"economic_aid_assistance\"=>1.3427734375, \"intelligence_counterintelligence\"=>-0.80126953125, \"investment\"=>3.701171875, \"joint_security_force_exercise\"=>-1.6611328125, \"media_campaign_intervention\"=>-0.373779296875, \"social_academic_cultural_activity\"=>-0.4814453125, \"political_process_policy_intervention\"=>0.59326171875, \"professional_cultural_exchange\"=>-0.0151824951171875, \"security_cooperation\"=>-0.3154296875, \"security_force_facility_presence\"=>0.77880859375, \"official_security_force_facility_presence\"=>-0.84765625, \"surveillance\"=>2.044921875, \"tech_transfer_investment\"=>0.95458984375, \"trade_agreement_exchange\"=>-1.44140625, \"trade_financial_sanction\"=>-0.342041015625, \"transnational_organization_crime\"=>0.413330078125}}, \"location\"=>{\"lat\"=>55.378051, \"lon\"=>-3.435973}}",
                        "civic1_model_outputs_defamationcase" => -0.26025390625,
                             "civic1_model_outputs_cooperate" => -0.434814453125,
                              "civic1_model_outputs_disaster" => 11.6015625,
                     "RAI_model_outputs_diplomatic_statement" => 3.83984375,
                           "civic1_model_outputs_legalaction" => -0.489990234375,
                     "civic1_model_outputs_violencenonlethal" => -0.019256591796875,
                                                  "title_rss" => "NULL",
                  "RAI_model_outputs_economic_aid_assistance" => 1.3427734375,
                                            "event_extracted" => 0,
                     "RAI_model_outputs_security_cooperation" => -0.3154296875,
                                        "maintext_translated" => "UK floods: g service.\nIt also offers advice on how to develop a \"flood plan\" and what you and your neighbours need to do once a flood warning has been issued for your area.",
                     "RAI_model_outputs_diplomatic_mediation" => -0.71142578125,
                 "RAI_model_outputs_trade_financial_sanction" => -0.342041015625,
                        "civic1_model_outputs_violencelethal" => -0.0216827392578125,
                                               "location_lon" => -3.435973,
        "RAI_model_outputs_social_academic_cultural_activity" => -0.4814453125,
                                                      "title" => "UK floods: How can you protect your home or business?",
                           "civic1_model_outputs_legalchange" => -1.2109375,
                                                       "host" => "Caitlyns-MBP.lan",
    "RAI_model_outputs_arms_transfer_security_aid_assistance" => -1.603515625,
                                              "date_download" => "2021-02-10T06:37:49Z",
                                                    "logdate" => "2021-02-10T06:37:50+00:00",
                                "civic1_model_outputs_praise" => -0.833984375,
                               "RAI_model_outputs_investment" => 3.701171875,
         "RAI_model_outputs_security_force_facility_presence" => 0.77880859375,
                                                      "month" => 11,
                         "RAI_model_outputs_diplomatic_visit" => -0.61865234375,
            "RAI_model_outputs_joint_security_force_exercise" => -1.6611328125,
                                        "language_translated" => "en",
                                                   "mongo_id" => "60237f3e8cc71d1e208c9a2a",
                      "RAI_model_outputs_diaspora_activation" => -0.0677490234375,
                                     "RAI_model_outputs_-999" => -0.5390625,
                                                   "location" => [
    [0] "55.378051",
    [1] "-3.435973"
],
                                                   "language" => "en",
                                                       "year" => 2012,
                                              "source_domain" => "bbc.com",
                                                   "@version" => "1",
                      "civic1_model_outputs_mobilizesecurity" => -1.3720703125,
              "RAI_model_outputs_bribery_economic_corruption" => -0.3955078125,
                                 "civic1_model_outputs_purge" => -0.53662109375,
                                           "title_translated" => "UK floods: How can you protect your home or business?",
                              "civic1_model_outputs_threaten" => 0.1649169921875,
                 "RAI_model_outputs_tech_transfer_investment" => 0.95458984375,
    "RAI_model_outputs_political_process_policy_intervention" => 0.59326171875,
                                                "description" => "Advice on how you can protect your home or business from flooding, and limit the damage to your property.",
                                                 "title_page" => "UK floods: How can you protect your home or business? - BBC News",
                            "civic1_model_outputs_martiallaw" => 0.1685791015625,
                               "civic1_model_outputs_protest" => -0.6376953125,
                                "civic1_model_outputs_arrest" => -0.97900390625,
                                                "date_modify" => "2021-02-10T06:37:49Z",
                                "civic1_model_outputs_censor" => -0.3583984375,
           "RAI_model_outputs_professional_cultural_exchange" => -0.0151824951171875,
                                             "RAI_event_type" => "-999",
                                          "civic1_event_type" => "disaster",
                           "civic1_model_outputs_changepower" => -0.002994537353515625,
"RAI_model_outputs_official_security_force_facility_presence" => -0.84765625,
                                  "civic1_model_outputs_raid" => -0.650390625,
         "RAI_model_outputs_transnational_organization_crime" => 0.413330078125,
                                  "civic1_model_outputs_coup" => -0.3828125,
         "RAI_model_outputs_intelligence_counterintelligence" => -0.80126953125,
                 "RAI_model_outputs_trade_agreement_exchange" => -1.44140625,
              "RAI_model_outputs_media_campaign_intervention" => -0.373779296875,
                                               "date_publish" => "2012-11-26T15:48:38Z",
                                                        "url" => "https://www.bbc.com/news/science-environment-20497598",
                   "RAI_model_outputs_diplomatic_recognition" => -2.3828125,
                      "RAI_model_outputs_diplomatic_sanction" => -0.81982421875,
                             "RAI_model_outputs_surveillance" => 2.044921875,
                                                   "filename" => "news_science-environment-20497598_1612939069.html"

```

}

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 8, 2021, 10:19pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/17 "2021-04-08T22:19:39Z")

</div>

> [@caitlyn.carlisle](#):
>
> "location" =\> ["%{[location\_lat]}","%{[location\_lon]}"]

You still have the same syntax error

This has extra brackets... you did not paste in what I showed these `[]`s `^` are extra

```auto
"location" => ["%{[location_lat]}","%{[location_lon]}"]
                  ^ ^ ^ ^

```

Should be

```auto
"location" => ["%{location_lat}","%{location_lon}"]
No Brackets ^

```

The `geo_point` requires a specific type of data because of your syntax error you are trying to put a string in for `location.lat` and `location.lon` which are `float` s. This will work if you just clean up your syntax

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 10:29pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/18 "2021-04-08T22:29:43Z")

</div>

> [@caitlyn.carlisle](#):
>
> `UK floods: How can you prote`

Thank you! I changed the conf file but still getting this error

```
{
                         "RAI_model_outputs_diplomatic_visit" => -0.61865234375,
                             "civic1_model_outputs_cooperate" => -0.434814453125,
                                                      "month" => 11,
                                                  "title_rss" => "NULL",
                           "civic1_model_outputs_legalchange" => -1.2109375,
                     "RAI_model_outputs_diplomatic_statement" => 3.83984375,
                      "RAI_model_outputs_diplomatic_sanction" => -0.81982421875,
                                          "civic1_event_type" => "disaster",
                                                      "title" => "UK floods: How can you protect your home or business?",
                                  "civic1_model_outputs_coup" => -0.3828125,
                                                  "log_entry" => "{\"_id\"=>BSON::ObjectId('60237f3e8cc71d1e208c9a2a'), \"authors\"=>[], \"date_download\"=>2021-02-10 06:37:49 UTC, \"date_modify\"=>2021-02-10 06:37:49 UTC, \"date_publish\"=>2012-11-26 15:48:38 UTC, \"description\"=>\"Advice on how you can protect your home or business from flooding, and limit the damage to your property.\", \"filename\"=>\"news_science-environment-20497598_1612939069.html\", \"image_url\"=>\"https://ichef.bbci.co.uk/news/1024/media/images/64390000/jpg/_64390370_floodhomepa.jpg\", \"language\"=>\"en\", \"title\"=>\"UK floods: How can you protect your home or business?\", \"title_page\"=>\"UK floods: How can you protect your home or business? - BBC News\", \"title_rss\"=>\"NULL\", \"source_domain\"=>\"bbc.com\", \"maintext\"=>\"UK floods: How can you protect your home or business? Published 26 November 2012\\nimage caption People, on average, have to wait up to nine months before they can return to their flood-damaged homes\\nMore than five-and-a-half million properties in England and Wales are deemed to be at risk from flooding.\\nThis year hasd-water into the property?\\nThere are a number of routes in which floodwater can enter a propep a \\\"flood plan\\\" and what you and your neighbours need to do once a flood warning has been issued for your area.\", \"title_translated\"=>\"UK floods: How can you protect your home or business?\", \"mordecai_locations\"=>{\"GBR\"=>[\"United Kingdom of Great Britain and Northern Ireland\"]}, \"civic1\"=>{\"event_type\"=>\"disaster\", \"model_outputs\"=>{\"arrest\"=>-0.97900390625, \"censor\"=>-0.3583984375, \"changeelection\"=>-1.294921875, \"changepower\"=>-0.002994537353515625, \"cooperate\"=>-0.434814453125, \"coup\"=>-0.3828125, \"defamationcase\"=>-0.26025390625, \"disaster\"=>11.6015625, \"legalaction\"=>-0.489990234375, \"legalchange\"=>-1.2109375, \"martiallaw\"=>0.1685791015625, \"mobilizesecurity\"=>-1.3720703125, \"praise\"=>-0.833984375, \"protest\"=>-0.6376953125, \"purge\"=>-0.53662109375, \"raid\"=>-0.650390625, \"threaten\"=>0.1649169921875, \"violencelethal\"=>-0.0216827392578125, \"violencenonlethal\"=>-0.019256591796875}}, \"month\"=>11, \"year\"=>2012, \"RAI\"=>{\"event_type\"=>\"-999\", \"model_outputs\"=>{\"-999\"=>-0.5390625, \"arms_transfer_security_aid_assistance\"=>-1.603515625, \"bribery_economic_corruption\"=>-0.3955078125, \"diaspora_activation\"=>-0.0677490234375, \"diplomatic_mediation\"=>-0.71142578125, \"diplomatic_recognition\"=>-2.3828125, \"diplomatic_sanction\"=>-0.81982421875, \"diplomatic_statement\"=>3.83984375, \"diplomatic_visit\"=>-0.61865234375, \"economic_aid_assistance\"=>1.3427734375, \"intelligence_counterintelligence\"=>-0.80126953125, \"investment\"=>3.701171875, \"joint_security_force_exercise\"=>-1.6611328125, \"media_campaign_intervention\"=>-0.373779296875, \"social_academic_cultural_activity\"=>-0.4814453125, \"political_process_policy_intervention\"=>0.59326171875, \"professional_cultural_exchange\"=>-0.0151824951171875, \"security_cooperation\"=>-0.3154296875, \"security_force_facility_presence\"=>0.77880859375, \"official_security_force_facility_presence\"=>-0.84765625, \"surveillance\"=>2.044921875, \"tech_transfer_investment\"=>0.95458984375, \"trade_agreement_exchange\"=>-1.44140625, \"trade_financial_sanction\"=>-0.342041015625, \"transnational_organization_crime\"=>0.413330078125}}, \"location\"=>{\"lat\"=>55.378051, \"lon\"=>-3.435973}}",
                      "civic1_model_outputs_mobilizesecurity" => -1.3720703125,
                        "civic1_model_outputs_violencelethal" => -0.0216827392578125,
                 "RAI_model_outputs_trade_agreement_exchange" => -1.44140625,
                           "civic1_model_outputs_legalaction" => -0.489990234375,
                                "civic1_model_outputs_censor" => -0.3583984375,
                                                       "host" => "Caitlyns-MBP.lan",
                                                   "mongo_id" => "60237f3e8cc71d1e208c9a2a",
                        "civic1_model_outputs_changeelection" => -1.294921875,
                                            "event_extracted" => 0,
                        "civic1_model_outputs_defamationcase" => -0.26025390625,
                                                "description" => "Advice on how you can protect your home or business from flooding, and limit the damage to your property.",
                                     "RAI_model_outputs_-999" => -0.5390625,
        "RAI_model_outputs_social_academic_cultural_activity" => -0.4814453125,
                                        "language_translated" => "en",
    "RAI_model_outputs_political_process_policy_intervention" => 0.59326171875,
                 "RAI_model_outputs_tech_transfer_investment" => 0.95458984375,
                                               "location_lon" => -3.435973,
                                                        "url" => "https://www.bbc.com/news/science-environment-20497598",
                                                       "tags" => [
    [0] "_mutate_error"
],
                              "civic1_model_outputs_threaten" => 0.1649169921875,
"RAI_model_outputs_official_security_force_facility_presence" => -0.84765625,
                              "civic1_model_outputs_disaster" => 11.6015625,
                     "RAI_model_outputs_security_cooperation" => -0.3154296875,
                                                   "@version" => "1",
    "RAI_model_outputs_arms_transfer_security_aid_assistance" => -1.603515625,
            "RAI_model_outputs_joint_security_force_exercise" => -1.6611328125,
                                              "source_domain" => "bbc.com",
                      "RAI_model_outputs_diaspora_activation" => -0.0677490234375,
         "RAI_model_outputs_intelligence_counterintelligence" => -0.80126953125,
                                                   "language" => "en",
                  "RAI_model_outputs_economic_aid_assistance" => 1.3427734375,
                               "RAI_model_outputs_investment" => 3.701171875,
                                        "maintext_translated" => "UK floods: How can you protect your home or business? Published 26 November 2012\nimage caption People, on average, have to wait up to nine months before they can return to their flooent Agency's flood warning service.\nIt also offers advice on how to develop a \"flood plan\" and what you and your neighbours need to do once a flood warning has been issued for your area.",
                                           "title_translated" => "UK floods: How can you protect your home or business?",
                                "civic1_model_outputs_praise" => -0.833984375,
                                              "date_download" => "2021-02-10T06:37:49Z",
                                                 "title_page" => "UK floods: How can you protect your home or business? - BBC News",
                                                    "logdate" => "2021-02-10T06:37:50+00:00",
                     "civic1_model_outputs_violencenonlethal" => -0.019256591796875,
         "RAI_model_outputs_security_force_facility_presence" => 0.77880859375,
                            "civic1_model_outputs_martiallaw" => 0.1685791015625,
                                                       "year" => 2012,
                     "RAI_model_outputs_diplomatic_mediation" => -0.71142578125,
                                                   "location" => "55.378051",
                               "civic1_model_outputs_protest" => -0.6376953125,
                             "RAI_model_outputs_surveillance" => 2.044921875,
                                               "date_publish" => "2012-11-26T15:48:38Z",
              "RAI_model_outputs_bribery_economic_corruption" => -0.3955078125,
                                 "civic1_model_outputs_purge" => -0.53662109375,
                                                 "@timestamp" => 2021-04-08T22:27:07.629Z,
                   "RAI_model_outputs_diplomatic_recognition" => -2.3828125,
           "RAI_model_outputs_professional_cultural_exchange" => -0.0151824951171875,
                                               "location_lat" => 55.378051,
                                                "date_modify" => "2021-02-10T06:37:49Z",
                           "civic1_model_outputs_changepower" => -0.002994537353515625,
                                                   "filename" => "news_science-environment-20497598_1612939069.html",
                                             "RAI_event_type" => "-999",
              "RAI_model_outputs_media_campaign_intervention" => -0.373779296875,
                 "RAI_model_outputs_trade_financial_sanction" => -0.342041015625,
                                  "civic1_model_outputs_raid" => -0.650390625,
         "RAI_model_outputs_transnational_organization_crime" => 0.413330078125,
                                "civic1_model_outputs_arrest" => -0.97900390625

```

}

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 10:30pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/19 "2021-04-08T22:30:33Z")

</div>

Should I be converting them to floats in my conf file?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 8, 2021, 10:36pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/20 "2021-04-08T22:36:57Z")

</div>

This error? Not clear which mutate that is coming from.

> [@caitlyn.carlisle](#):
>
> ```auto
> "tags" => [
> [0] "_mutate_error"
> ],
> 
> ```

They look like floats... so you shouldn't,

Did you clean up and reapply the mapping , then run logstash?

Why don't you try this version, that is what I like.

Lets try this, I know this works I don't use the other version.

```auto
copy => {
        "location_lon" => "[location][lon]"
        "location_lat" => "[location][lat]"
    }

```

---

<div class="post-metadata">

**Author:** ![caitlyn.carlisle](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@caitlyn.carlisle](https://discuss.elastic.co/u/caitlyn.carlisle)\
**Post date:** [April 8, 2021, 10:46pm UTC](https://discuss.elastic.co/t/geo-point-mapping/269504/21 "2021-04-08T22:46:17Z")

</div>

> [@stephenb](#):
>
> ```auto
> copy => {
> "location_lon" => "[location][lon]"
> "location_lat" => "[location][lat]"
> }
> 
> ```

Thank you so so much! This worked! I really appreciate your help!!

[Next page](https://discuss.elastic.co/t/geo-point-mapping/269504.md?page=2)
