I need to create the dynamic mapping for unknown new fields in the index using a dynamic template. My sample mapping is:
{
"indexname":{
"dynamic_templates":[
{
"template_1":{
"match":"*",
"dynamic fields":{
"type":"dynamictype",
"index":"not_analyzed"
}
}
}
]
}
}
I'm little bit confused to create the dynamic mapping is anyone kindly guide me to solve this.
i want to create the mapping multiple fields during the run time using java API is any one to guide me.