Index templates - Rejecting mapping update as the final mapping would have more than 1 type: [map2, map1]

In ES 1.x, i've used index template with multiple mapping. But the same is failing with below error in ES 6.x, Note: No issue if I've remove one of the mapping.

Now the questions are

  1. Do we have any settings to enable multiple mapping option?
  2. If so, Is it recommended? -or- Do you recommend to create two different index templates for each map1 and map2 from the below example
  3. Consider there is an option in 6.x to enable multiple mapping... what about 7.x? does 7.x supports the same option?

Error:

 "type": "illegal_argument_exception",
 "reason": "Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [map2, map1]"

Ex:

{
"order": 0,
"template": "myindex-*",
"settings": {
"index.refresh_interval": "500s",
"index.number_of_replicas": "2",
"index.number_of_shards": "5"
},
"mappings": {
"map1": {
"properties": {
"myfield1": {
"type": "text"
}
}
},
"map2": {
"properties": {
"myfield2": {
"type": "text"
}
}
}
},
"aliases": {
"myindex": {}
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.