# Error: Index pattern does not contain any geospatial fields

**URL:** <https://discuss.elastic.co/t/error-index-pattern-does-not-contain-any-geospatial-fields/312686>\
**Category:** Logstash\
**Created:** [August 23, 2022, 8:34am UTC](https://discuss.elastic.co/t/error-index-pattern-does-not-contain-any-geospatial-fields/312686 "2022-08-23T08:34:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricard-CT](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@Ricard-CT](https://discuss.elastic.co/u/Ricard-CT)\
**Post date:** [August 23, 2022, 8:34am UTC](https://discuss.elastic.co/t/error-index-pattern-does-not-contain-any-geospatial-fields/312686/1 "2022-08-23T08:34:32Z")

</div>

Hello everyone,

I'm trying to use the geo\_ip filter on my logstash, but it is not working.

When I try to create the map, this error appears:  
"Index pattern does not contain any geospatial fields"

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

The problem is that the location is not geo\_point type and I got stuck there.

```auto
"geoip" : {
          "properties" : {
            "city_name" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "continent_code" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "country_code2" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "country_code3" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "country_name" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "dma_code" : {
              "type" : "long"
            },
            "ip" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "latitude" : {
              "type" : "float"
            },
            "location" : {
              "properties" : {
                "lat" : {
                  "type" : "float"
                },
                "lon" : {
                  "type" : "float"
                }
              }
            },
            "longitude" : {
              "type" : "float"
            },
            "postal_code" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "region_code" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "region_name" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "timezone" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }

```

I need to "change" the field type, but I don't know how to continue.  
I would really appreciate your help.

I'm adding my logstash config:

```auto
input {
  beats {
     port => 5044
  }
}

filter {

  grok {
     match => ["message", "%{IP:client_ip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:apache_timestamp}\] \"%{WORD:method} /%{NOTSPACE:request_page} HTTP/%{NUMBER:http_versi>
  }
  geoip {
     source => "client_ip"
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "apache-%{+YYYY.MM.dd}"
  }
}

```

Thanks!

---

<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 20, 2022, 8:35am UTC](https://discuss.elastic.co/t/error-index-pattern-does-not-contain-any-geospatial-fields/312686/2 "2022-09-20T08:35:04Z")

</div>

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