Greetings everyone. Has any successfully applied a dynamic mapping template to the default type of an index? Take a look at the "dynamic_templates" section of this page:
http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html (at the bottom).
Anyway, I am trying to implement dynamic templates in the elasticsearch PHP client and running into some problems. Here is my code:
$mapping = array(
"dynamic_templates" => array(
"template_ant" => array(
"match" => "*_i",
"mapping" => array(
"type" => "integer",
"index" => "not_analyzed",
"store" => "yes",
),
),
),
);
$type = $index->getType("_default_");
$type->setMapping($mapping);
But I am getting this exception:
Code: 0
Message: MapperParsingException[No type specified for property [dynamic_templates]]
Any help or guidance you can provide will be greatly appreciated!
Sky