# Mapping geo\_point from .csv

**URL:** <https://discuss.elastic.co/t/mapping-geo-point-from-csv/146183>\
**Category:** Elasticsearch\
**Created:** [August 27, 2018, 1:37pm UTC](https://discuss.elastic.co/t/mapping-geo-point-from-csv/146183 "2018-08-27T13:37:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanatos\_Daniel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanatos_daniel/32/20893_2.png) [@Tanatos\_Daniel](https://discuss.elastic.co/u/Tanatos_Daniel)\
**Post date:** [August 27, 2018, 1:37pm UTC](https://discuss.elastic.co/t/mapping-geo-point-from-csv/146183/1 "2018-08-27T13:37:56Z")

</div>

I cannot understand what I'm missing.

classes2.conf

```
input {
    	 file {
	
	path => "D:\Workspace.Elastic\FinalVersions\classes.csv"	
	start_position => "beginning"
	sincedb_path => "/dev/null"
  }
}

filter {
	
	csv {
		columns => ["TITLE","PROFFESSOR","MAJOR","SEMESTER","student_count","unit","rating","submit_date","latitude","longitude"]
		separator => ","
		
		
	}	
	
	mutate {
		convert => {"latitude" => "float"}
		convert => {"longitude" => "float"}
		add_field => ["location", "%{latitude},%{longitude}"]
		convert => {"location" => "float"}
	}
}

output {
	stdout { codec => rubydebug }
	elasticsearch {
		hosts => "localhost:9200"
		index => "classes"
	}
}

```

classesRating\_mapping2.json

> {  
> "class": {  
> "properties": {  
> "title": {  
> "type": "text"  
> },  
> "professor": {  
> "type": "text"  
> },  
> "major": {  
> "type": "text"  
> },  
> "semester": {  
> "type": "text"  
> },  
> "student\_count": {  
> "type": "integer"  
> },  
> "unit": {  
> "type": "integer"  
> },  
> "rating": {  
> "type": "integer"  
> },  
> "submit\_date": {  
> "type": "date",  
> "format": "yyyy-MM-dd"  
> },  
> "location": {  
> "type": "geo\_point"  
> }  
> }  
> }  
> }

And I get the following error:  
` Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"classes", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x67037d>], :response=>{"index"=>{"_index"=>"classes", "_type"=>"doc", "_id"=>"Qbyle2UBUFBR3F6hEg3C", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [classes] as the final mapping would have more than 1 type: [doc, class]"}}}}`

---

<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:** [August 27, 2018, 9:07pm UTC](https://discuss.elastic.co/t/mapping-geo-point-from-csv/146183/2 "2018-08-27T21:07:10Z")

</div>

> [@Tanatos\_Daniel](#):
>
> Rejecting mapping update to [classes] as the final mapping would have more than 1 type: [doc, class]

That is because of the `class` here;

> [@Tanatos\_Daniel](#):
>
> {  
> "class": {  
> "properties": {

You should change that to `doc`, which is the default.

---

<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:** [September 24, 2018, 9:07pm UTC](https://discuss.elastic.co/t/mapping-geo-point-from-csv/146183/3 "2018-09-24T21:07:22Z")

</div>

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