# Can't merge a non object mapping with an object mapping error in machine learning(beta) module

**URL:** <https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-with-an-object-mapping-error-in-machine-learning-beta-module/88713>\
**Category:** Elasticsearch\
**Created:** [June 8, 2017, 12:18pm UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-with-an-object-mapping-error-in-machine-learning-beta-module/88713 "2017-06-08T12:18:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gautamv](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gautamv](https://discuss.elastic.co/u/gautamv)\
**Post date:** [June 8, 2017, 12:18pm UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-with-an-object-mapping-error-in-machine-learning-beta-module/88713/1 "2017-06-08T12:18:09Z")

</div>

Hi,

I'm trying out the new machine learning module in x pack. I'm trying to identify rare response codes in HTTP Access logs in time. My logs are being stored in elasticsearch as below:

```
{
  "_index": "logstash-2017.05.18",
  "_type": "Accesslog",
  "_id": "AVxvVfFGdMmRr-0X-J5P",
  "_version": 1,
  "_score": null,
  "_source": {
    "request": "/web/Q123/images/buttons/asdf.gif",
    "server": "91",
    "auth": "-",
    "ident": "-",
    "verb": "GET",
    "type": "Accesslog",
    "path": "/path/to/log",
    "@timestamp": "2017-05-18T10:20:00.000Z",
    "response": "304",
    "clientip": "1.1.1.1",
    "@version": "1",
    "host": "ip-10-10-10-10",
    "httpversion": "1.1",
    "timestamp": "18/May/2017:10:20:00 +0530"
  },
  "fields": {
    "@timestamp": [
      1495102800000
    ]
  }

```

I added a detector where I selected the function as 'rare' and the by\_field\_name' as 'response'. But when I save the job I get the following error:

```
Save failed: [illegal_argument_exception] Can't merge a non object mapping [response] with an object mapping [response]

```

Please 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:** [July 6, 2017, 12:18pm UTC](https://discuss.elastic.co/t/cant-merge-a-non-object-mapping-with-an-object-mapping-error-in-machine-learning-beta-module/88713/2 "2017-07-06T12:18:14Z")

</div>

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