# MapperParsingException\[Failed to parse mapping...\]

**URL:** <https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978>\
**Category:** Elasticsearch\
**Created:** [June 19, 2017, 5:54pm UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978 "2017-06-19T17:54:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [June 19, 2017, 5:54pm UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/1 "2017-06-19T17:54:17Z")

</div>

I keep getting the following exception while creating index using API. This does not happen in all cases.

{"message":"Elasticsearch exception: MapperParsingException[Failed to parse mapping [records]: name cannot be empty string]; nested: IllegalArgumentException[name cannot be empty string]

Its a large index with over 200 fields and is created using API. I am wondering how do I know what exactly is the issue. Could someone throw some light?

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [June 20, 2017, 3:20am UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/2 "2017-06-20T03:20:01Z")

</div>

Replying on my own thread. It looks like there is a period "." in the fieldName. I tried it manually and found out that adding period at the end of the fieldname works (e.g. "myfield..."), however if there is any character after period (e.g. "myfield.x"), then it fails with the above error.

Interestingly, the error message from ES and API are different, which made it hard to debug. I had to look into ES code. I guess period makes it confusing for ES to differentiate nested and other types.

Is there any official documentation that mentions the list of illegal characters in ES? [This](https://discuss.elastic.co/t/illegal-characters-in-elasticsearch-field-names/17196) post specifies that ".", "#" & "\*" are illegal characters.

---

<div class="post-metadata">

**Author:** ![mulgar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mulgar/32/18862_2.png) [@mulgar](https://discuss.elastic.co/u/mulgar)\
**Post date:** [June 20, 2017, 4:49am UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/3 "2017-06-20T04:49:27Z")

</div>

I'm new here so I can't give you a definitive answer here, but while working on an unrelated mapping issue I did come across the following which may be relevant for you to check into: [https://www.elastic.co/guide/en/elasticsearch/reference/2.4/dots-in-names.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/dots-in-names.html)

Also this discussion is older but may be worthwhile for you as well: [https://github.com/elastic/elasticsearch/issues/15951](https://github.com/elastic/elasticsearch/issues/15951)

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [June 20, 2017, 5:13am UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/4 "2017-06-20T05:13:42Z")

</div>

That's quite useful. I guess the bottom line is that, we shouldn't use dots. In our case we are using ES version 5.3

---

<div class="post-metadata">

**Author:** ![mulgar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mulgar/32/18862_2.png) [@mulgar](https://discuss.elastic.co/u/mulgar)\
**Post date:** [June 20, 2017, 6:19am UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/5 "2017-06-20T06:19:59Z")

</div>

I think dots can be used, but there are some caveats or some complexities to be aware of, but if they can be avoided then it could make things a lot easier.

---

<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 18, 2017, 6:20am UTC](https://discuss.elastic.co/t/mapperparsingexception-failed-to-parse-mapping/89978/6 "2017-07-18T06:20:19Z")

</div>

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