MapperParsingException thrown when putting a valid mapping

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 :
input_box_clicks={type=long}, name={type=string}, action={type=string},
type={type=string}, user={type=string}, timestamp={format=dateOptionalTime,
type=date}}}}}]]; ","status":400}

when I ran this:

Invoke-WebRequest -Uri 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:


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 ( and as a github issue, but I don't think the fixes offered helped.


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
To view this discussion on the web visit
For more options, visit