# MapperParsingException thrown when putting a valid mapping

**URL:** <https://discuss.elastic.co/t/mapperparsingexception-thrown-when-putting-a-valid-mapping/19669>\
**Category:** Elasticsearch\
**Created:** [September 8, 2014, 9:09pm UTC](https://discuss.elastic.co/t/mapperparsingexception-thrown-when-putting-a-valid-mapping/19669 "2014-09-08T21:09:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lauren\_Burke](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Lauren\_Burke](https://discuss.elastic.co/u/Lauren_Burke)\
**Post date:** [September 8, 2014, 9:09pm UTC](https://discuss.elastic.co/t/mapperparsingexception-thrown-when-putting-a-valid-mapping/19669/1 "2014-09-08T21:09:10Z")

</div>

I received this error (working in Windows PowerShell, elasticsearch 1.2.1  
(but also tested on 1.3.2)):

Invoke-WebRequest : {"error":"MapperParsingException[mapping  
[highlighttestmapping]]; nested:  
MapperParsingException[Root type mapping not empty after parsing! Remaining  
fields: [highlighttest :  
{mappings={StandardizedNames={properties={output={type=string},  
entity\_type={type=string},  
input\_box\_clicks={type=long}, name={type=string}, action={type=string},  
alternative\_selection\_clicks={type=long},  
type={type=string}, user={type=string}, timestamp={format=dateOptionalTime,  
type=date}}}}}]]; ","status":400}

when I ran this:

Invoke-WebRequest -Uri [http://localhost:9200/highlighttest](http://localhost:9200/highlighttest) -Method PUT

with a mapping.json file saved in the requisite  
.../config/mappings/highlighttest directory. I tried this by referencing  
the file directly from the command too. The frustrating part is that I was  
trying to edit the mapping of one field, so I (unwittingly) ended up  
getting the dynamic mapping for the index from documents I had previously  
sent to the index, deleted the 'highlighttest' index, and then attempted to  
re-create the index with the same dynamic mapping from before (so it should  
be a valid mapping, correct?) and adding one setting for one field. Trying  
to create the index with this mapping returned the error above, so just to  
be sure I didn't mess up something with this one field I tried to create  
the index with the same exact mapping that the dynamic mapping returned,  
and I still got this error. Am I putting the mapping incorrectly? This is  
the mapping that elasticsearch returned when I got the dynamic mapping:

{"highlighttest":{"mappings":{"StandardizedNames":{"properties":{"action":{"type":"string"},"alternative\_selection\_clicks":{"type":"long"},"entity\_type":{"type":"string"},"input\_box\_clicks":{"type":"long"},"name":{"type":"string"},"timestamp":{"type":"date","format":"dateOptionalTime"},"type":{"type":"string"},"user":{"type":"string"}}}}}}

And that's the mapping I tried to send when I created this index again after deleting it. My end goal is really to just make the "name" and "action" fields have the property "index":"not\_analyzed", but I don't think that's what's creating the problem here. Am I putting the mapping incorrectly somehow? I've seen this error in this group ([https://groups.google.com/d/msg/elasticsearch/3SwwJOEgrro/8DiAeCKMRjIJ](https://groups.google.com/d/msg/elasticsearch/3SwwJOEgrro/8DiAeCKMRjIJ)) and as a github issue, but I don't think the fixes offered helped.

Thanks!  
-Lauren

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8421f4ff-5e00-4db4-a38b-18b0ecde2ad2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8421f4ff-5e00-4db4-a38b-18b0ecde2ad2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:03am UTC](https://discuss.elastic.co/t/mapperparsingexception-thrown-when-putting-a-valid-mapping/19669/2 "2017-07-06T01:03:50Z")

</div>


