# I need help! elastic doesn't get my mapping!

**URL:** <https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932>\
**Category:** Elasticsearch\
**Created:** [June 27, 2020, 7:29am UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932 "2020-06-27T07:29:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sina12](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sina12](https://discuss.elastic.co/u/sina12)\
**Post date:** [June 27, 2020, 7:29am UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932/1 "2020-06-27T07:29:23Z")

</div>

Hi Guys!

I am in trouble. I need to visualize my data but elasticsearch doesn't accept my mapping. I edited the mapping like that:

```auto
PUT /my_example/_mappings
{
 
  "properties" : {
  "id" :{
    "type": "boolean"
  },
  "sha" :{
    "type" : "text"
  },
  "ref" : {
    "type" : "text"
  },
  "status": {
    "type" : "text"
    },
  "created_at": {
    "type" : "date"
    },
    "updated_at": {
       "type" : "date"
    },
    "web_url": {
    "type" : "text"
    }
}}

```

and I removed "message" and "field". For some reason my mapping doesn't work and elastic puts the data into the "message" field like that:

```auto
{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 4,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "my_example",
        "_type" : "_doc",
        "_id" : "idx",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2020-06-19T16:20:54.819Z",
          "field" : "\"created_at\"",
          "message" : """ "created_at": "2020-06-19T16:20:54.819Z","""
        }
      },
      {
        "_index" : "my_example",
        "_type" : "_doc",
        "_id" : "idy",
        "_score" : 1.0,
        "_source" : {
          "@timestamp" : "2020-06-19T16:52:15.314Z",
          "field" : "\"updated_at\"",
          "message" : """ "updated_at": "2020-06-19T16:52:15.314Z",
        "web_url": "http://example1"
    },
    {
        "id": 2,
        "sha": "example",
        "ref": "ref",
        "status": "success","""
        }
      }, 

```

So actually Elastic created two hits for one and it writes all the inputs into "message".  
I am really desperate and it would be a pleasure if someone could help me.  
THANKS!!!

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [June 27, 2020, 11:27am UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932/2 "2020-06-27T11:27:00Z")

</div>

Can you show how you are ingesting this data?

---

<div class="post-metadata">

**Author:** ![mykael](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@mykael](https://discuss.elastic.co/u/mykael)\
**Post date:** [June 27, 2020, 2:06pm UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932/4 "2020-06-27T14:06:33Z")

</div>

Try asking with an elasticsearch tag. Kibana is just the visualization/editor level.

Mik

---

<div class="post-metadata">

**Author:** ![sina12](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sina12](https://discuss.elastic.co/u/sina12)\
**Post date:** [June 27, 2020, 2:18pm UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932/5 "2020-06-27T14:18:20Z")

</div>

Hi Aaron, thanks for you answer!  
My Ingest pipeline looks like this:

```auto
{
  "description": "Ingest pipeline created by file structure finder",
  "processors": [
    {
      "grok": {
        "field": "message",
        "patterns": [
          " %{QUOTEDSTRING:field}: \"%{TIMESTAMP_ISO8601:timestamp}\",.*"
        ]
      }
    },
    {
      "date": {
        "field": "timestamp",
        "formats": [
          "ISO8601"
        ]
      }
    },
    {
      "remove": {
        "field": "timestamp"
      }
    }
  ]
}

```

---

<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 25, 2020, 2:18pm UTC](https://discuss.elastic.co/t/i-need-help-elastic-doesnt-get-my-mapping/238932/6 "2020-07-25T14:18:31Z")

</div>

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