# Elasticsearch ingestion : Geo point and numerical fields not recognize

**URL:** https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623
**Category:** Elasticsearch
**Created:** [December 6, 2024, 6:39pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623 "2024-12-06T18:39:28Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 6, 2024, 6:39pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/1 "2024-12-06T18:39:28Z")

</div>

Hi all,

I'm trying to ingest into an index my data (json) with a HTTP POST. Everything works fine but I have a geo point like this { "point\_location" : "11.0500,-0.2500" } which is not recognized as a geo point but like a simple text. I have another field which is a number and this one is recognized like a text too. and not as a number.  
How can I fix it ?  
Thx.

---

<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: [December 6, 2024, 7:13pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/2 "2024-12-06T19:13:04Z")

</div>

Hi @Phildefer

You need to create mappings ahead of time to make sure you get the types you expect.

You will need to show us your mapping and exact sample documents so that we can see / test

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 6, 2024, 7:38pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/3 "2024-12-06T19:38:33Z")

</div>

Thx @stephenb for your answer.  
I use N8N to manage my data (Get the json via an api and a http request) a node to create the index with this mapping :

```auto
"mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "actor1": {
        "type": "text"
      },
      "actor2": {
        "type": "text"
      },
      "admin1": {
        "type": "keyword"
      },
      "admin2": {
        "type": "keyword"
      },
      "admin3": {
        "type": "keyword"
      },
      "assoc_actor_1": {
        "type": "text"
      },
      "assoc_actor_2": {
        "type": "text"
      },
      "civilian_targeting": {
        "type": "keyword"
      },
      "country": {
        "type": "keyword"
      },
      "disorder_type": {
        "type": "keyword"
      },
      "event_date": {
        "type": "keyword"
      },
      "event_id_cnty": {
        "type": "keyword"
      },
      "event_type": {
        "type": "keyword"
      },
      "fatalities": {
        "type": "long"
      },
      "geo_precision": {
        "type": "long"
      },
      "inter1": {
        "type": "keyword"
      },
      "inter2": {
        "type": "keyword"
      },
      "interaction": {
        "type": "keyword"
      },
      "iso": {
        "type": "long"
      },
      "latitude": {
        "type": "double"
      },
      "location": {
        "type": "keyword"
      },
      "longitude": {
        "type": "double"
      },
      "notes": {
        "type": "text"
      },
      "point_location": {
        "type": "geo_point"
      },
      "region": {
        "type": "keyword"
      },
      "source": {
        "type": "text"
      },
      "source_scale": {
        "type": "keyword"
      },
      "sub_event_type": {
        "type": "keyword"
      },
      "tags": {
        "type": "text"
      },
      "time_precision": {
        "type": "long"
      },
      "timestamp": {
        "type": "date",
        "format": "epoch_second"
      },
      "year": {
        "type": "long"
      }
    }
  }
}

```

and a HTTP request Node to send the json to elasticsearch.

---

<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: [December 6, 2024, 8:16pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/4 "2024-12-06T20:16:14Z")

</div>

What does the incoming JSON look like and which fields are not correct?  
Mapping is just part of the puzzle

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 6, 2024, 8:26pm UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/5 "2024-12-06T20:26:56Z")

</div>

here is an exemple of the json :

```auto
{
"event_id_cnty": 
"GHA2450",
"event_date": 
"2024-11-29",
"year": 
"2024",
"time_precision": 
"1",
"disorder_type": 
"Political violence",
"event_type": 
"Battles",
"sub_event_type": 
"Armed clash",
"actor1": 
"Kusasis Ethnic Militia (Ghana)",
"assoc_actor_1": 
"",
"inter1": 
"Identity militia",
"actor2": 
"Mamprusi Ethnic Militia (Ghana)",
"assoc_actor_2": 
"",
"inter2": 
"Identity militia",
"interaction": 
"Identity militia-Identity militia",
"civilian_targeting": 
"",
"iso": 
"288",
"region": 
"Western Africa",
"country": 
"Ghana",
"admin1": 
"Upper East",
"admin2": 
"Bawku",
"admin3": 
"",
"location": 
"Bawku",
"latitude": 
"11.0500",
"longitude": 
"-0.2500",
"geo_precision": 
"1",
"source": 
"Citi News",
"source_scale": 
"National",
"notes": 
"On 29 November 2024, Kusasis and Mamprusi ethnic militia clashed, in the continued chieftaincy dispute, around the Gingande-Zongo area in Bawku city (Bawku, Upper East). Three people were killed in the clash, an unspecified number of people were seriously injured, and houses were set ablaze.",
"fatalities": 
"3",
"tags": 
"",
"timestamp": 
"1733203849",
"point_location": 
"11.0500,-0.2500"
},

```

The fields Fatalities are in text format and not into a number format in elasticsearch and the point\_location is not recognized as a geo\_point.

---

<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: [December 7, 2024, 1:26am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/6 "2024-12-07T01:26:24Z")

</div>

Looks good to me I suspect you are confusing `_source` and `fields`  
`_source` how the data comes in  
`fields` A representation of how the data is stored.

Note in the fields section

```auto
          "point_location": [
            {
              "coordinates": [
                -0.25,
                11.05
              ],
              "type": "Point"
            }
          ],

```

Here we go...

```auto
PUT discuss-geo
{
"mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "actor1": {
        "type": "text"
      },
      "actor2": {
        "type": "text"
      },
      "admin1": {
        "type": "keyword"
      },
      "admin2": {
        "type": "keyword"
      },
      "admin3": {
        "type": "keyword"
      },
      "assoc_actor_1": {
        "type": "text"
      },
      "assoc_actor_2": {
        "type": "text"
      },
      "civilian_targeting": {
        "type": "keyword"
      },
      "country": {
        "type": "keyword"
      },
      "disorder_type": {
        "type": "keyword"
      },
      "event_date": {
        "type": "keyword"
      },
      "event_id_cnty": {
        "type": "keyword"
      },
      "event_type": {
        "type": "keyword"
      },
      "fatalities": {
        "type": "long"
      },
      "geo_precision": {
        "type": "long"
      },
      "inter1": {
        "type": "keyword"
      },
      "inter2": {
        "type": "keyword"
      },
      "interaction": {
        "type": "keyword"
      },
      "iso": {
        "type": "long"
      },
      "latitude": {
        "type": "double"
      },
      "location": {
        "type": "keyword"
      },
      "longitude": {
        "type": "double"
      },
      "notes": {
        "type": "text"
      },
      "point_location": {
        "type": "geo_point"
      },
      "region": {
        "type": "keyword"
      },
      "source": {
        "type": "text"
      },
      "source_scale": {
        "type": "keyword"
      },
      "sub_event_type": {
        "type": "keyword"
      },
      "tags": {
        "type": "text"
      },
      "time_precision": {
        "type": "long"
      },
      "timestamp": {
        "type": "date",
        "format": "epoch_second"
      },
      "year": {
        "type": "long"
      }
    }
  }
}

POST discuss-geo/_doc
{
  "event_id_cnty": "GHA2450",
  "event_date": "2024-11-29",
  "year": "2024",
  "time_precision": "1",
  "disorder_type": "Political violence",
  "event_type": "Battles",
  "sub_event_type": "Armed clash",
  "actor1": "Kusasis Ethnic Militia (Ghana)",
  "assoc_actor_1": "",
  "inter1": "Identity militia",
  "actor2": "Mamprusi Ethnic Militia (Ghana)",
  "assoc_actor_2": "",
  "inter2": "Identity militia",
  "interaction": "Identity militia-Identity militia",
  "civilian_targeting": "",
  "iso": "288",
  "region": "Western Africa",
  "country": "Ghana",
  "admin1": "Upper East",
  "admin2": "Bawku",
  "admin3": "",
  "location": "Bawku",
  "latitude": "11.0500",
  "longitude": "-0.2500",
  "geo_precision": "1",
  "source": "Citi News",
  "source_scale": "National",
  "notes": "On 29 November 2024, Kusasis and Mamprusi ethnic militia clashed, in the continued chieftaincy dispute, around the Gingande-Zongo area in Bawku city (Bawku, Upper East). Three people were killed in the clash, an unspecified number of people were seriously injured, and houses were set ablaze.",
  "fatalities": "3",
  "tags": "",
  "timestamp": "1733203849",
  "point_location": "11.0500,-0.2500"
}

GET discuss-geo/_search
{
  "fields": [
    "*"
  ]
}

```

Result

```auto
{
  "took": 36,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "discuss-geo",
        "_id": "fXq2npMBS9VyZaU18gvx",
        "_score": 1,
        "_source": {
          "event_id_cnty": "GHA2450",
          "event_date": "2024-11-29",
          "year": "2024",
          "time_precision": "1",
          "disorder_type": "Political violence",
          "event_type": "Battles",
          "sub_event_type": "Armed clash",
          "actor1": "Kusasis Ethnic Militia (Ghana)",
          "assoc_actor_1": "",
          "inter1": "Identity militia",
          "actor2": "Mamprusi Ethnic Militia (Ghana)",
          "assoc_actor_2": "",
          "inter2": "Identity militia",
          "interaction": "Identity militia-Identity militia",
          "civilian_targeting": "",
          "iso": "288",
          "region": "Western Africa",
          "country": "Ghana",
          "admin1": "Upper East",
          "admin2": "Bawku",
          "admin3": "",
          "location": "Bawku",
          "latitude": "11.0500",
          "longitude": "-0.2500",
          "geo_precision": "1",
          "source": "Citi News",
          "source_scale": "National",
          "notes": "On 29 November 2024, Kusasis and Mamprusi ethnic militia clashed, in the continued chieftaincy dispute, around the Gingande-Zongo area in Bawku city (Bawku, Upper East). Three people were killed in the clash, an unspecified number of people were seriously injured, and houses were set ablaze.",
          "fatalities": "3",
          "tags": "",
          "timestamp": "1733203849",
          "point_location": "11.0500,-0.2500"
        },
        "fields": {
          "country": [
            "Ghana"
          ],
          "notes": [
            "On 29 November 2024, Kusasis and Mamprusi ethnic militia clashed, in the continued chieftaincy dispute, around the Gingande-Zongo area in Bawku city (Bawku, Upper East). Three people were killed in the clash, an unspecified number of people were seriously injured, and houses were set ablaze."
          ],
          "disorder_type": [
            "Political violence"
          ],
          "event_id_cnty": [
            "GHA2450"
          ],
          "iso": [
            288
          ],
          "year": [
            2024
          ],
          "latitude": [
            11.05
          ],
          "source": [
            "Citi News"
          ],
          "sub_event_type": [
            "Armed clash"
          ],
          "event_type": [
            "Battles"
          ],
          "event_date": [
            "2024-11-29"
          ],
          "time_precision": [
            1
          ],
          "longitude": [
            -0.25
          ],
          "timestamp": [
            "1733203849"
          ],
          "geo_precision": [
            1
          ],
          "inter1": [
            "Identity militia"
          ],
          "inter2": [
            "Identity militia"
          ],
          "source_scale": [
            "National"
          ],
          "assoc_actor_1": [
            ""
          ],
          "civilian_targeting": [
            ""
          ],
          "assoc_actor_2": [
            ""
          ],
          "tags": [
            ""
          ],
          "point_location": [
            {
              "coordinates": [
                -0.25,
                11.05
              ],
              "type": "Point"
            }
          ],
          "actor2": [
            "Mamprusi Ethnic Militia (Ghana)"
          ],
          "actor1": [
            "Kusasis Ethnic Militia (Ghana)"
          ],
          "fatalities": [
            3
          ],
          "admin1": [
            "Upper East"
          ],
          "interaction": [
            "Identity militia-Identity militia"
          ],
          "admin2": [
            "Bawku"
          ],
          "location": [
            "Bawku"
          ],
          "region": [
            "Western Africa"
          ],
          "admin3": [
            ""
          ]
        }
      }
    ]
  }
}

```

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 7, 2024, 2:20am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/7 "2024-12-07T02:20:06Z")

</div>

Thx so much it works!

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 7, 2024, 2:41am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/8 "2024-12-07T02:41:13Z")

</div>

oups no there is a problem i just noticed that I have a problem with the dates. I need to desactivate the date filter to see the points on the map. It seems that the dates are good (event\_date) but i can see that @timestamp is empty.

---

<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: [December 7, 2024, 3:18am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/9 "2024-12-07T03:18:21Z")

</div>

You don't have a

`@timestamp` field

You have a

`timestamp`

Field in your source document, perhaps I am missing.

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 7, 2024, 3:21am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/10 "2024-12-07T03:21:46Z")

</div>

So I can just delete the @timestamp in the mapping ?

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 7, 2024, 3:24am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/11 "2024-12-07T03:24:18Z")

</div>

I thought this field was mandatory to manage the time in the dashboard or in the maps.

---

<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: [December 7, 2024, 3:24am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/12 "2024-12-07T03:24:34Z")

</div>

Sure.

What do you want to do?

You will need to create a Data View and set the time field to your `timestamp` if you want to use that in the map .. and filter by time

---

<div class="post-metadata">

### Author: ![Phildefer](https://avatars.discourse-cdn.com/v4/letter/p/9fc348/32.png) [@Phildefer](https://discuss.elastic.co/u/Phildefer)
#### Post date: [December 7, 2024, 3:28am UTC](https://discuss.elastic.co/t/elasticsearch-ingestion-geo-point-and-numerical-fields-not-recognize/371623/13 "2024-12-07T03:28:30Z")

</div>

I didn't know that it was possible to change the time field in the dataview that's why I thought @timestamp was mandatory. So it's ok now. Thx so much!
