I am confused by the ES docs, in fact here they state the the indexes must go in the mapping dir (and indexname sub dirs):
Mappings can be defined within files called [mapping_name].json and be placed either under config/mappings/_default location, or under config/mappings/[index_name] (for mappings that should be associated only with a specific index).
But then here in the "config" section, it states:
Index templates can also be placed within the config location (path.conf) under the templates directory (note, make sure to place them on all master eligible nodes). For example, a file called template_1.json can be placed under config/templates and it will be added if it matches an index.
I put my mapping in /config/mappings/myindexname/mappinfile.json
and it is like:
{
"template": "maincontentindex",
"settings": {
"index": {
"analysis": {
"analyzer": {
"htmlStrippingAnalyzer": {
"tokenizer": "standard",
"filter": ["standard", "lowercase"],
"char_filter": "html_strip"
}
}
}
}
},
"mappings": {
"rendition": {
"_timestamp": {
"enabled": true,
"store" : true
},
"properties": {
"key": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"parentPage": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"type": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"language": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"device": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"territory": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"channel": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"template": {
"type": "string",
"store": "yes",
"analyzer": "keyword"
},
"meta": {
"properties": {
"content": {
"type": "string",
"store": "yes"
}
}
}
}
}
}
}
if I use the REST Api to put it in the server it works fine and if I call /maincontentindex/rendition/_mapping I just get the above structure (even with no data).
But with the directory I just get a 404 and if I insert anything it's just the usual dynamic mapping.