# Elasticsearch service throwing failed to parse exception while indexing content

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-throwing-failed-to-parse-exception-while-indexing-content/253651>\
**Category:** Elasticsearch\
**Created:** [October 29, 2020, 7:09am UTC](https://discuss.elastic.co/t/elasticsearch-service-throwing-failed-to-parse-exception-while-indexing-content/253651 "2020-10-29T07:09:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PravinC](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pravinc/32/78059_2.png) [@PravinC](https://discuss.elastic.co/u/PravinC)\
**Post date:** [October 29, 2020, 7:09am UTC](https://discuss.elastic.co/t/elasticsearch-service-throwing-failed-to-parse-exception-while-indexing-content/253651/1 "2020-10-29T07:09:23Z")

</div>

We are trying to index document in Elasticsearch with below structure,

```json
{
  "data": {
    "blocks": [
      {
        "block": {
          "note": "<p>Test</p>",
          "digital-asset-service": ""
        }
      },
      {
        "block": "Hello"
      }
    ],
    "categories": {
      "year": [
        "Current Year"
      ],
      "region": [
        "United States"
      ]
    }
  }
}

```

Having mapping configuration as below,

```json
{
  "settings": {
    "index": {
      "number_of_replicas": 1,
      "number_of_shards": 1,
      "max_result_window": "30000"
    }
  },
  "mappings": {
    "catalog": {
      "dynamic": "false",
      "properties": {
        "data": {
          "dynamic": "false",
          "type": "object",
          "properties": {
            "categories": {
              "dynamic": "true",
              "type": "object"
            }
          }
        }
      }
    }
  }
}

```

Document is getting indexed via lambda, but throwing below error,

```auto
RequestError(400, 'mapper_parsing_exception', 'failed to parse [data.blocks.block]'

```

Interestingly, when tried indexing/updating document directly via Kibana dev tools, it works without any issue.

Intention is to ignore data.blocks.block from mapping. But its not happening as per the documentation.

> **[dynamic | Elasticsearch Reference \[6.3\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/dynamic.html)**

Thanks in advance.

---

<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:** [November 3, 2020, 12:15am UTC](https://discuss.elastic.co/t/elasticsearch-service-throwing-failed-to-parse-exception-while-indexing-content/253651/2 "2020-11-03T00:15:21Z")

</div>

Welcome to our community! 😃

What are you using to send these to Elasticsearch?

---

<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:** [December 1, 2020, 12:15am UTC](https://discuss.elastic.co/t/elasticsearch-service-throwing-failed-to-parse-exception-while-indexing-content/253651/3 "2020-12-01T00:15:38Z")

</div>

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