Hi Everyone ,
I have created a template for my indices with the intention that all indexes that fall under the index pattern will have same mapping.
This is my template
{
"sqe_template1": {
"order": 0,
"index_patterns": [
"sqe*",
"log-ecoa*"
],
"settings": {},
"mappings": {
"doc": {
"properties": {
"BytesReceived": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"BytesTransmitted": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"ClientTime": {
"type": "date",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Device": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"DeviceSerialNumber": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Environment": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"EnvironmentID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"EventOrder": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"KRPT": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Level": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Locale": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Location": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Message": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"ProcessId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"ProdVer": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"ReceivedTime": {
"type": "date",
"fields": {
"keyword": {
"type": "keyword"
}
},
"format": "dd/MMM/yyyy:HH:mm:ss +SSSS"
},
"Role": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"SessionID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"SigID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Site": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Sponsor": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Status": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Study": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"StudyVer": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"SubjectID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"TransmissionID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"Type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"message": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
},
"aliases": {}
}
}
For testing purposes I added an extra field apart from the one's in the template and tried to POST it. Ideally I thought the extra field wont show up since I have put in a template.
But the extra field does get added. How should I force my data to follow the template
Kindly Help