MapperParsingException[Analyzer [name_analyzer] not found for field [name]]

Hi, I am using IK analyzer (https://github.com/medcl/elasticsearch-analysis-ik).

My following commands throws exception like below:

curl -XDELETE http://localhost:9200/test

curl -XPUT http://localhost:9200/test -d'
{
"analysis" : {
"analyzer" : {
"name_analyzer" : {
"type" : "org.elasticsearch.index.analysis.IkAnalyzerProvider",
"tokenizer" : "name_tokenizer"
}
},
"tokenizer" : {
"name_tokenizer" : {
"type" : "nGram",
"min_gram" : 1,
"max_gram" : 4
}
}
}
}'

curl -XPUT http://localhost:9200/test/testtype/_mapping -d '
{
"testtype" : {
"_source" : {
"enabled" : false
},
"_all" : {
"enabled" : true,
"index_analyzer": "ik",
"search_analyzer": "ik",
"term_vector": "no",
"store": "false"
},
"properties" : {
"name" : {
"type" : "string",
"index_analyzer" : "name_analyzer"
}
}
}
}'

{"error":"MapperParsingException[Analyzer [name_analyzer] not found for field [name]]","status":400}

This issue confuses me for a while... can someone shed some light on this and see what I did wrong?

Thanks!
Yanchen