I'm a newb to ES... found a tutorial online:
PUT /company
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1
},
"analysis": {
"analyzer": {
"analyzer-name": {
"type": "custom",
"tokenizer": "keyword",
"filter": "lowercase"
}
}
}
},
"mappings": {
"properties": {
"age": {
"type": "integer"
},
"experienceInYears": {
"type": "integer"
},
"name": {
"type": "keyword",
"analyzer": "analyzer-name"
}
}
}
}
What is wrong with this? I get the following errors:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [name] has unsupported parameters: [analyzer : analyzer-name]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_doc]: Mapping definition for [name] has unsupported parameters: [analyzer : analyzer-name]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [name] has unsupported parameters: [analyzer : analyzer-name]"
}
},
"status": 400
}
I get that the field analyzer is causing the issue :), but isn't that correct?