I have index with mapping:
GET /warhammer/_mapping
Gives me:
{
"warhammer": {
"mappings": {
"logs": {
"properties": {
"@timestamp": {
"type": "date",
"format": "dateOptionalTime"
},
"@version": {
"type": "string"
},
"HostName": {
"type": "string"
},
"boosters": {
"type": "long"
},
"device_model": {
"type": "string"
},
"build_type": {
"type": "string"
}....
}
I need to change mapping of field device_model to not_analysed!
I've tried:
PUT /warhammer/_mapping
{
"device_model": { "type": "string",
"fields": { "raw":
{ "type": "string", "index": "not_analyzed" } } }
}
and this:
PUT /warhammer/_mapping
{
"device_model": {
"type": "string",
"fields":
{ "raw":
{ "type": "string",
"index": "not_analyzed" }
}
}
}
But it gives me:
{
"error": "ActionRequestValidationException[Validation Failed: 1: mapping type is missing;]",
"status": 400
}
What am I doing wrong? Help please!