# Merging dynamic updates triggered a conflict

**URL:** <https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276>\
**Category:** Logstash\
**Created:** [December 15, 2015, 8:08pm UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276 "2015-12-15T20:08:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spuder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spuder/32/44895_2.png) [@spuder](https://discuss.elastic.co/u/spuder)\
**Post date:** [December 15, 2015, 8:08pm UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276/1 "2015-12-15T20:08:53Z")

</div>

I'm using elasticsearch 2.1 and logstash 2.1 to parse logs.

One log line in particular always throws an error in logstash.

```
:response=>{
"create"=>{
  "_index"=>"logstash-2015.12.15",
  "_type"=>"logs", 
  "_id"=>"AVGnCkWh8dsIxdcksmWF", 
  "status"=>400, 
  "error"=>{
    "type"=>"mapper_parsing_exception", 
    "reason"=>"Merging dynamic updates triggered a conflict: mapper [additional.attrsCallback(NG-SOHWR0B1)] of different type, current_type [long], merged_type [double]"

```

Here is the log (as json)

```auto
{
  "severity":2,
  "timeStamp":"2015/12/15 19:08:08.087Z",
  "server":"foobar.example.com",
  "caller":"foobar.Search.Timings",
  "id":{
    "type":"timing event",
    "id":"0000000111112222",
    "class":"foobar.Search",
    "function":"Dispose",
    "thread":94},
    "message":"Query timings",
    "additional":{
      "file":"c:\\foo\bar.cs",
      "line":1416,
      "Validators":15.6253,
      "get customFields":[15.6253,
      0],
      "attrsCallback(NG-SOHWR0B1)":[0,15.6253],
      "Parse Query":0,
      "Network request http://10.10.10.10:8900/solr/xxxxxxxx/select":31.2498,
      "generate query XXXXXXX":0,
      "ndSolrQueryGeneratorFTI.generateQuery MD":0,
      "getServerAndCores":0,
      "process results":0
      }
  }
}

```

To work around the issue I'm trying to use a `mutate` filter in logstash to convert the following field to a `float`

```
  "attrsCallback(XX-YYYYY)":[0,15.6253],

```

```auto
filter {
    mutate {
      convert => ["[additional][attrsCAllback(*)]", "float"]
    }
}

```

Unfortunately this does not work as I still see the same error in the logstash logs.

Any advice how I can convert the line to something that elasticsearch wont choke on? I'd rather use logstash to mutate the field, rather than creating a custom elasticsearch mapping since it is much easier to deploy.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 15, 2015, 9:27pm UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276/2 "2015-12-15T21:27:40Z")

</div>

But the problem is that the existing mapping is long and you're trying to post a document with a double, so converting the value in Logstash to a float won't address the problem. Pick a data type and stick to it. If you want it to be a floating-point field you'll have to reindex the existing data.

---

<div class="post-metadata">

**Author:** ![spuder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spuder/32/44895_2.png) [@spuder](https://discuss.elastic.co/u/spuder)\
**Post date:** [December 15, 2015, 10:16pm UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276/3 "2015-12-15T22:16:12Z")

</div>

Good point. The mapping will be updated with a new index right? Since logstash indicies are created every day, then tomorrows index should be a "float". I assume the problem will go away with the new index?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 15, 2015, 10:28pm UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276/4 "2015-12-15T22:28:40Z")

</div>

Hopefully, but you should really specify the mapping explicitly to make sure.

---

<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:** [July 6, 2017, 5:18am UTC](https://discuss.elastic.co/t/merging-dynamic-updates-triggered-a-conflict/37276/5 "2017-07-06T05:18:17Z")

</div>


