Closed
Description
PUT test-index
{
"settings": {
"analysis": {
"char_filter": {
"whitespace_remove": {
"type": "pattern_replace",
"pattern": "\\s+",
"replacement": " "
}
},
"normalizer": {
"my_normalizer": {
"type": "custom",
"char_filter": ["whitespace_remove"],
"filter": ["lowercase", "asciifolding"]
}
}
}
},
"mappings": {
"type": {
"properties": {
"foo": {
"type": "keyword",
"normalizer": "my_normalizer"
}
}
}
}
}
Returns with :
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Custom normalizer [my_normalizer] may not use char filter [whitespace_remove]"
}
],
"type": "illegal_argument_exception",
"reason": "Custom normalizer [my_normalizer] may not use char filter [whitespace_remove]"
},
"status": 400
}
Note the use case - normalizing whitespace of keyword fields, to overcome differences in user queries (for exact boosting) or aggregations on user based content