# Unable to index with below error

**URL:** <https://discuss.elastic.co/t/unable-to-index-with-below-error/265277>\
**Category:** Logstash\
**Created:** [February 24, 2021, 5:21am UTC](https://discuss.elastic.co/t/unable-to-index-with-below-error/265277 "2021-02-24T05:21:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)\
**Post date:** [February 24, 2021, 5:21am UTC](https://discuss.elastic.co/t/unable-to-index-with-below-error/265277/1 "2021-02-24T05:21:42Z")

</div>

Hi Team,

I am facing an error while ingesting logs in elasticsearch.

```auto
[2021-02-24T10:44:15,640][WARN][logstash.outputs.elasticsearch][main][69d9e547a776f45c4f2e9d8533dceb1247bd41e30f7abf5602145295741669ba] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"net-2021.02.24", :routing=>nil, :_type=>"doc"}, #<LogStash::Event:0x415eaf58>], :response=>{"index"=>{"_index"=>"dmarc-2021.02.24", "_type"=>"doc", "_id"=>"MoB10ncBdEzm8CaFi734", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"mapper [geoip.latitude] cannot be changed from type [half_float] to [float]"}}}}

```

My mapping file is

```auto
{
  "index_patterns" : "net-*",
  "version" : 60001,
  "settings" : {
    "index.refresh_interval" : "5s",
    "number_of_shards": 1
  },
  "mappings" : {
    "dynamic_templates" : [ {
      "message_field" : {
        "path_match" : "message",
        "match_mapping_type" : "string",
        "mapping" : {
          "type" : "text",
          "norms" : false
        }
      }
    }, {
      "string_fields" : {
        "match" : "*",
        "match_mapping_type" : "string",
        "mapping" : {
          "type" : "text", "norms" : false,
          "fields" : {
            "keyword" : { "type": "keyword", "ignore_above": 256 }
          }
        }
      }
    } ],
    "properties" : {
      "@timestamp": { "type": "date"},
      "@version": { "type": "keyword"},
      "geoip" : {
        "dynamic": true,
        "properties" : {
          "source_ip": { "type": "ip" },
          "location" : { "type" : "geo_point" },
         "latitude" : { "type" : "half_float" },
          "longitude" : { "type" : "half_float" }
      }
    }
  }
}

```

Then even I changed to float in my template, delete the complete index but the result is same.

Can someone pls help?

---

<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:** [March 24, 2021, 5:22am UTC](https://discuss.elastic.co/t/unable-to-index-with-below-error/265277/2 "2021-03-24T05:22:28Z")

</div>

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