# Geo\_point index create in Elasticsearch

**URL:** https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029
**Category:** Elasticsearch
**Created:** [September 11, 2019, 7:31am UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029 "2019-09-11T07:31:32Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 11, 2019, 7:31am UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/1 "2019-09-11T07:31:32Z")

</div>

Hi All,

Below it the my logstash output conf file, as per the conf new Index will create on daily basis. how can I create these all indexes with geo\_type ?

> output {  
> elasticsearch {  
> hosts =\> ["localhost"]  
> user =\> 'elastic'  
> password =\> 'password'  
> manage\_template =\> false  
> index =\> "file-%{+YYYY.MM.dd}"  
> }  
> }

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [September 16, 2019, 12:52pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/2 "2019-09-16T12:52:24Z")

</div>

We would need to know more information about what you are trying to do in order to answer your question. Which geo\_type for when fields, how you manage templates (since you disable logstash template management), etc.

---

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 16, 2019, 3:22pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/3 "2019-09-16T15:22:43Z")

</div>

can you please look into here [Logstah geoIp filter for kibana Map](https://discuss.elastic.co/t/logstah-geoip-filter-for-kibana-map/199226)

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [September 16, 2019, 3:47pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/4 "2019-09-16T15:47:00Z")

</div>

@ashok9177 I am sorry, I really want to help, but I don't understand your questions, either here or in logstash forum.

---

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 16, 2019, 4:02pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/5 "2019-09-16T16:02:08Z")

</div>

Thank you so much for your reply, I will explain in details here,

I have sample log file here, there are cordinates in log message, I just want to display cordinates in kibana map

> 2019-09-10 13:47:45.678 [INFO] from application in pool-1-thread-21 - SegmentName : ID Verified Longitude : 39.954752, Latitude : 39.954752 for transactionId : oiou9P3JQ-gDoee2

My question is How to geoip filter to parse two coordinates ? and how to create geo\_point type indexes in elasticsearch

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [September 16, 2019, 4:09pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/6 "2019-09-16T16:09:41Z")

</div>

The answer for both questions is in the documentation. Did you try to read documentation?

---

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 16, 2019, 4:23pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/7 "2019-09-16T16:23:25Z")

</div>

I tried below filter but not working can you please give me same filter

> mutate {  
> add\_field =\> ["[geoip][location]", "%{longitude}" ]  
> add\_field =\> ["[geoip][location]", "%{latitude}" ]  
> }
> 
> mutate {  
> convert =\> ["[geoip][location]", "float" ]  
> }
> 
> }

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [September 16, 2019, 4:24pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/8 "2019-09-16T16:24:07Z")

</div>

> [@ashok9177](#):
>
> but not working can you please give me same filter

What's not working?

---

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 16, 2019, 4:26pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/9 "2019-09-16T16:26:49Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a0b8b59fd32280f07f4ded82591e5e97fd65fe43.png)

getting this error, I think it's index type issue I am creating on daily basis but no idea how convert it as geo\_point index

> output {  
> elasticsearch {  
> hosts =\> ["localhost"]  
> user =\> 'elastic'  
> password =\> 'password'  
> manage\_template =\> false  
> index =\> "file-%{+YYYY.MM.dd}"  
> }  
> }

---

<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: [September 16, 2019, 8:51pm UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/10 "2019-09-16T20:51:57Z")

</div>

hi @ashok9177

You need to create a mapping first that has a geo\_point data type first _before_ you index the data

See This Thread is may help

> [@Convert lat and long to geohash](https://discuss.elastic.co/t/convert-lat-and-long-to-geohash/197631):
>
> I have done quite a bit of searching, but either don't know what I am doing wrong, or don't know the right question to ask. I am ingesting data, including latitude and longitude, and converting them to floats like this: filter { ruby { path =\> "/opt/bitnami/logstash/chop.rb" } mutate { rename =\> { "stop\_lon" =\> "[location][lon]" "stop\_lat" =\> "[location][lat]" } } However, I need to convert the location to a geohash so I can do mapping, but I am struggling to f…

---

<div class="post-metadata">

### Author: ![ashok9177](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@ashok9177](https://discuss.elastic.co/u/ashok9177)
#### Post date: [September 17, 2019, 9:37am UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/11 "2019-09-17T09:37:59Z")

</div>

Hi @stephenb thanks for reply, I am confused with what logstash filter to use, can you please suggest me ?

---

<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: [October 15, 2019, 9:38am UTC](https://discuss.elastic.co/t/geo-point-index-create-in-elasticsearch/199029/12 "2019-10-15T09:38:00Z")

</div>

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