Thanks @jimczi
But I'm unable to add a normalizer on an existing index. (I am able to do this for analyzer, but that doesn't work for keyword fields).
curl -XPUT localhost:9200/ganesh_index/?pretty -d '
> {
> "settings": {
> "analysis": {
> "normalizer": {
> "useLowercase": {
> "type": "custom",
> "filter": [ "lowercase" ]
> }
> }
> }
> },
> "mappings":{
> "ganesh_type":{
> "properties":{
> "title":{
> "normalizer":"useLowercase",
> "type":"keyword"
> }
> }
> }
> }
> }'
{
"error" : {
"root_cause" : [
{
"type" : "index_already_exists_exception",
"reason" : "index [ganesh_index/mg5TckzaR5KZDE-FphTeDg] already exists",
"index_uuid" : "mg5TckzaR5KZDE-FphTeDg",
"index" : "ganesh_index"
}
],
"type" : "index_already_exists_exception",
"reason" : "index [ganesh_index/mg5TckzaR5KZDE-FphTeDg] already exists",
"index_uuid" : "mg5TckzaR5KZDE-FphTeDg",
"index" : "ganesh_index"
},
"status" : 400
}