MapperParsingException trying to define an index template

Hi,
I'm using Elasticsearch 1.2.1, and attempting to define an index template
that should prevent the analysis of certain ID fields in our datamodel,
whiles allowing everything else to be analyzed. I've created a template
json file and put it in the config/templates directory.

Here is my template json file
{
"carewex_template": {
"template": "*",
"settings": {
"index.number_of_shards": 2
},
"mappings": {
"default": {
"_all": {
"enabled": false
},
"type": "{dynamic_type}",
"index": "analyzed",
"fields": {
"id": {"type": "{dynamic_type}", "index":
"not_analyzed"},
"productId": {"type": "{dynamic_type}", "index":
"not_analyzed"},
"facilityId": {"type": "{dynamic_type}", "index":
"not_analyzed"},
"departmentId": {"type": "{dynamic_type}", "index":
"not_analyzed"},
"patientId": {"type": "{dynamic_type}", "index":
"not_analyzed"},
"secondaryId": {"type": "{dynamic_type}", "index":
"not_analyzed"}
}

        }
    }
}

}

However when I try to index, I get the following exception.

Caused by: org.elasticsearch.index.mapper.MapperParsingException: Root type
mapping not empty after parsing! Remaining fields: [index : analyzed] [type
: {dynamic_type}] [fields : {secondaryId={index=not_analyzed,
type={dynamic_type}}, id={index=not_analyzed, type={dynamic_type}},
patientId={index=not_analyzed, type={dynamic_type}},
departmentId={index=not_analyzed, type={dynamic_type}},
facilityId={index=not_analyzed, type={dynamic_type}},
productId={index=not_analyzed, type={dynamic_type}}}]

Any ideas on what do do about this?

--
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/36afc803-0c92-42f8-b2f8-e9ba01ce4a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.