# How to find the data that causes the mapper\_parsing\_exception

**URL:** https://discuss.elastic.co/t/how-to-find-the-data-that-causes-the-mapper-parsing-exception/297096
**Category:** Elasticsearch
**Created:** [February 14, 2022, 3:20am UTC](https://discuss.elastic.co/t/how-to-find-the-data-that-causes-the-mapper-parsing-exception/297096 "2022-02-14T03:20:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AlanSBN](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@AlanSBN](https://discuss.elastic.co/u/AlanSBN)
#### Post date: [February 14, 2022, 3:20am UTC](https://discuss.elastic.co/t/how-to-find-the-data-that-causes-the-mapper-parsing-exception/297096/1 "2022-02-14T03:20:40Z")

</div>

I am using the Node Elasticsearch client from inside Node Express, and I constructed a query that generates the following error:

`(node:85104) ResponseError: mapper_parsing_exception: [mapper_parsing_exception] Reason: object mapping for [data] tried to parse field [data] as object, but found a concrete value at onBody`

The error occurs _after_ the call to search returns the correct result.

The query is built as follows:

```auto
    const query = {
      _source: false,
      query: {
        bool: {
          filter: [
            { term: { owner: user }},
            { terms: { type: ['TEXT', 'MEDI']}}
          ]
        }
      },
      fields: ['serial', 'tags']
    }

```

The value `user` is a number. There is a field named `data` in the documents, mapped as an `object` . However all instances of this field are in fact an object.

Further, there is no error if I do the exact same query via the Kibana devtool. It returns the same set of documents that the javascript call does. This suggests to me either:

1. The error is in the node client.
2. The error is not visible from the Kibana client.

I am looking for some suggestion as to where this error is coming from and how to solve it. Any help appreciated.

---

<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 14, 2022, 3:20am UTC](https://discuss.elastic.co/t/how-to-find-the-data-that-causes-the-mapper-parsing-exception/297096/2 "2022-03-14T03:20:41Z")

</div>

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