Hello, everyone
I am currently testing elasticsearch 5.0. That version should, as far as I understand, solve and old problem of mine : allowing doc values to be used on keyword-analyzed fields.
This is great, because I have absolutely no power over the json pushed via elasticsearch (actually, tempering with the source in any way, even changing the casing, would have legal repercussions)
Problem is, I make a lot of aggregations on fields that can be either given to me in lowercase, or in uppercase, so, "index" : "no" is not a viable solution.
Enter the "keyword" datatype. In my template, I built an analyser : key_lowercase
"analysis" : {
"analyzer" : {
"key_lowercase" : {
"tokenizer" : "keyword",
"filter" : "lowercase"
}
},
And I try to use it such :
"my_field" : {
"type" : "keyword",
"analyzer" : "key_lowercase"
},
In my understanding, this should work, the keyword data type having been created with that in mind.
However, when I try to push my template, I get this error :
{
"type" : "mapper_parsing_exception",
"reason" : "Faled to parse mapping [my_type]: Mapping definition for [my_field] has unsuported parameters : [analyzer : key_lowercase]
}
What did I not understand?
How should I proceed to index those field in lowercase?
Thanks a lot