Updating index with Kibana Dev Tools with geo_point

I have this index:

{
"example_index_name": {
"aliases": {},
"mappings": {
  "lambda-type": {
    "properties": {
      "document": {
        "properties": {
          "Entities": {
            "properties": {
              "BeginOffset": {
                "type": "long"
              },
              "EndOffset": {
                "type": "long"
              },
              "Score": {
                "type": "float"
              },
              "Text": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "Type": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
           ** "lat": {
                "type": "float" **
              },
              "lng": {
           **   "type": "float" **
              }
            }
          },
          "File": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },

The **'s show the problem area - I have latitude and longitude, but Kibana will not recognize the numbers because they are not in the geo_point format. I've been trying to update them in Kibana Dev Tools with PUT example_index_name/_mapping/_doc.

I get this error:

{
"error": {
"root_cause": [
  {
    "type": "mapper_parsing_exception",
    "reason": "Root mapping definition has unsupported parameters: 
      ...etc

When I try to update lat & lng type to geo_point, I just get an error. I'm following Kibana docs. How do I update this? I feel like the coordinates are in the wrong section of the index.

Can you paste the full error message?

for geo_point to work, you need to have a single field that contains the lat and lng fields. So instead of lat being type geo_point and lng being geo_point, you instead define a field, let's call it location, and describe that as geo_point:

{
"example_index_name": {
"aliases": {},
"mappings": {
  "lambda-type": {
    "properties": {
      "document": {
        "properties": {
          "Entities": {
            "properties": {
              "BeginOffset": {
                "type": "long"
              },
              "EndOffset": {
                "type": "long"
              },
              "Score": {
                "type": "float"
              },
              "Text": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "Type": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
           ** "location": {
                "type": "geo_point" **
              }
            }
          },
          "File": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
}

Then, you can index documents using something like { "location": { "lat": 123.45, "lng": 321.45} }

Right - I made the modification you suggested (didn't really need the full error message, you nailed it), and I get some dots on a map, but not a map background?

When I inspect the page, I get this:

setting active api to [es_5_0]
1.png:1 GET https://example.com/v1/default/2/1/1.png 404 (Not Found)

And a repeating list os such 404 Not Founds.

BUT then I changed the Base Layer Settings and the map came up. Rollercoaster of excitement over here

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