Hi,
I'm in need of some help with my Mapping template.
I previously had Elasticsearch 1.7.3 which was accidentally upgraded to 5.4.3 within one of our work projects (its a complicated story). We could downgrade it back to its previous version but I would rather continue either with this version or even a further stable version.
After spending some time researching as to how it should be, I was unable to fully grasp how to convert my old mappings to the required standard. I'm reasonably new to Elasticsearch & am the only developer who works with it (a.t.m.) where I am.
The "technical environment, sizing, architecture, nodes..." should be in this case irrelevant due to it being a simple mapping template, however if this information is needed I will post it afterwards
The Mapping is as follows:
POST /_template/all
{
"order": 0,
"template": "*",
"settings": {
"index": {
"analysis": {
"filter": {
"preserve_original": "true",
"patterns": [
"([a-zA-Z]+[-]+[a-zA-Z]+[-]+[0-9a-zA-Z])",
"([0-9a-zA-Z]+[-]+[0-9a-zA-Z]+)",
"([0-9a-zA-Z]+[_]+[0-9a-zA-Z]+)",
"([p{L}d]+)"
]
},
"ascii_folding": {
"type": "asciifolding",
"preserve_original": true
}
},
"analyzer": {
"InsertAnalyzer": {
"filter": [
"lowercase",
"preserve_original",
"ascii_folding"
],
"type": "custom",
"tokenizer": "keyword"
},
"SearchAnalyzer": {
"filter": [
"lowercase",
"ascii_folding"
],
"type": "custom",
"tokenizer": "whitespace"
}
}
}
},
"mappings": {
"cd-db": {
"properties": {
"Path": {
"include_in_all": true,
"fielddata": true,
"analyzer": "InsertAnalyzer",
"type": "text",
"fields": {
"keyword": {
"ignore_above": 1000,
"boost": 10,
"type": "keyword"
}
}
},
"CD-ID": {
"include_in_all": false,
"type": "long"
},
"Files": {
"type": "object",
"properties": {
"Size": {
"enabled": false
},
"File": {
"include_in_all": true,
"fielddata": true,
"analyzer": "InsertAnalyzer",
"type": "text",
"fields": {
"keyword": {
"ignore_above": 1000,
"type": "keyword"
}
}
}
}
},
"Date": {
"include_in_all": false,
"format": "yyyy-MM-ddHH:mm:ss||yyyy-MM-dd||epoch_millis",
"type": "date"
}
}
},
"new_document_service": {
"properties": {
"DocumentsSent": {
"type": "integer"
},
"FilesSent": {
"type": "integer"
},
"LastID": {
"type": "integer"
},
"UpdateTime": {
"include_in_all": true,
"format": "yyyy-MM-dd@HH:mm:ss||epoch_millis",
"type": "date"
}
}
},
"insert_service": {
"properties": {
"DocumentsSent": {
"type": "integer"
},
"FilesSent": {
"type": "integer"
},
"LastID": {
"type": "integer"
},
"InsertTime": {
"include_in_all": true,
"format": "yyyy-MM-dd@HH:mm:ss||epoch_millis",
"type": "date"
}
}
},
"_default_": {
"dynamic_templates": [
{
"keyword": {
"mapping": {
"index": true,
"type": "keyword",
"analyzer": "InsertAnalyzer"
},
"match_mapping_type": "keyword"
}
}
]
}
},
"aliases": {}
}