# Issue in Geo\_point data type

**URL:** <https://discuss.elastic.co/t/issue-in-geo-point-data-type/120941>\
**Category:** Logstash\
**Created:** [February 21, 2018, 10:00pm UTC](https://discuss.elastic.co/t/issue-in-geo-point-data-type/120941 "2018-02-21T22:00:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prakash\_Punj](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@Prakash\_Punj](https://discuss.elastic.co/u/Prakash_Punj)\
**Post date:** [February 21, 2018, 10:00pm UTC](https://discuss.elastic.co/t/issue-in-geo-point-data-type/120941/1 "2018-02-21T22:00:31Z")

</div>

Below are the steps I am following to store geo\_point

a.) Created index : PUT chicago\_crime  
b.) Geo point mapping:

```
    PUT chicago_crime/_mapping/my_type
{
"my_type": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}

```

c.) logstash:

```
 input {
file {
path => "/home/ppunj/chicago-crime.csv"
start_position => 'beginning'
sincedb_path => '/dev/null'
}
}
filter {
csv {
separator => ","
columns => ["id","case","number","date","block","iucr","primary type","description","location description","arrest","domestic","district","ward","community area","year","latitude","longitude"]
}
date {
match => ["date", "MM/dd/yyyy HH:mm"]
target => "date"
locale => "en"
}
mutate {convert => ["latitude", "float"]}
mutate {convert => ["longitude", "float"]}
mutate {
rename => {
"longitude" => "[location][lon]"
"latitude" => "[location][lat]"
}
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "chicago_crime"
}
stdout {}
}

```

d.)SAMPLE DATA:

id,case number,date,block,iucr,primary type,description,location description,arrest,domestic,district,ward,community area,year,latitude,longitude  
10000092,HY189866,3/18/2015 19:44,047XX W OHIO ST,041A,BATTERY,AGGRAVATED: HANDGUN,STREET,FALSE,FALSE,11,28,25,2015,41.89139886,-87.74438457  
10000094,HY190059,3/18/2015 23:00,066XX S MARSHFIELD AVE,4625,OTHER OFFENSE,PAROLE VIOLATION,STREET,TRUE,FALSE,7,15,67,2015,41.77337153,-87.66531947  
10000095,HY190052,3/18/2015 22:45,044XX S LAKE PARK AVE,486,BATTERY,DOMESTIC BATTERY SIMPLE,APARTMENT,FALSE,TRUE,2,4,39,2015,41.81386068,-87.59664284  
10000096,HY190054,3/18/2015 22:30,051XX S MICHIGAN AVE,460,BATTERY,SIMPLE,APARTMENT,FALSE,FALSE,2,3,40,2015,41.80080242,-87.62261934  
10000097,HY189976,3/18/2015 21:00,047XX W ADAMS ST,031A,ROBBERY,ARMED: HANDGUN,SIDEWALK,FALSE,FALSE,11,28,25,2015,41.87806476,-87.74335401

ERROR after logstash ran:

[2018-02-21T16:47:43,277][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"chicago\_crime", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:0x4bdf395e], :response=\>{"index"=\>{"\_index"=\>"chicago\_crime", "\_type"=\>"doc", "\_id"=\>"cYNWumEBzT\_mw5xoIQ6O", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"[location] is defined as an object in mapping [doc] but this name is already used for a field in other types"}}}}

what I am missing ??

---

<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:** [March 21, 2018, 10:00pm UTC](https://discuss.elastic.co/t/issue-in-geo-point-data-type/120941/2 "2018-03-21T22:00:36Z")

</div>

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