Elasticsearch 5.4.0
My logstash will create index by date, I want to create index template,which can auto add raw field not-analyzed. so i can do aggs term by string field. I got some error when create template by kibana dev tools.
DSL text:
put /_template/template_log
{
"template": "logstash-log*",
"mappings": {
"gw-apache": {
"properties": {
"url": {
"type" :"text",
"fileds":{
"raw":{
"type":"text",
"index":"not_analyzed"
}
}
}
}
}
}
}
error output:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [url] has unsupported parameters: [fileds : {raw={index=not_analyzed, type=text}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [gw_apache]: Mapping definition for [url] has unsupported parameters: [fileds : {raw={index=not_analyzed, type=text}}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [url] has unsupported parameters: [fileds : {raw={index=not_analyzed, type=text}}]"
}
},
"status": 400
}
Thanks for your help