I'm trying to update my index, think I'm following the instructions but still not getting anywhere.
I was trying to my index template to convert lat & long to be geo_points and broke mapping for my host names which contain dashes (thus each segment between dashes was analyzed as a server).
I think I've updated the template properly but the current index is still messed up and I'm trying to resolve that.
The 'put' statement in Sense:
PUT filebeat-2016.07.21/_mapping/nginx-access { "properties": { "message": { "type": "string", "index": "not_analyzed" }, "host": { "type": "string" , "index": "not_analyzed" }, "server": { "type": "string", "index": "not_analyzed" } } }
And the response I get:
{ "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason": "Mapper for [server] conflicts with existing mapping in other types:\n[mapper [server] has different [index] values, mapper [server] has different [doc_values] values, cannot change from disabled to enabled, mapper [server] has different [analyzer], mapper [server] is used by multiple types. Set update_all_types to true to update [omit_norms] across all types., mapper [server] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [server] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]" } ], "type": "illegal_argument_exception", "reason": "Mapper for [server] conflicts with existing mapping in other types:\n[mapper [server] has different [index] values, mapper [server] has different [doc_values] values, cannot change from disabled to enabled, mapper [server] has different [analyzer], mapper [server] is used by multiple types. Set update_all_types to true to update [omit_norms] across all types., mapper [server] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [server] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]" }, "status": 400 }
I also use the ?update_all_types command as seen in the above error message and the documentation;
PUT filebeat-2016.07.21/_mapping/nginx-access?update_all_types
{
"mappings": {
"nginx-access": {
"properties": {
"message": {
"type": "string",
"index": "not_analyzed"
},
"host": {
"type": "string"
, "index": "not_analyzed"
},
"server": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
and I get a similar response;
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [server] conflicts with existing mapping in other types:\n[mapper [server] has different [index] values, mapper [server] has different [doc_values] values, cannot change from disabled to enabled, mapper [server] has different [analyzer]]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [server] conflicts with existing mapping in other types:\n[mapper [server] has different [index] values, mapper [server] has different [doc_values] values, cannot change from disabled to enabled, mapper [server] has different [analyzer]]"
},
"status": 400
}
Can someone please explain what I'm doing wrong? I've been messing with mappings for weeks now and can't find a guide that explains it. I feel like I'm 80% of the way there, but just need to figure out what I'm doing wrong. Thanks.