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 -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) 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8421f4ff-5e00-4db4-a38b-18b0ecde2ad2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.