Normalizer not working

** sorry is this is a repeated question. I have already done research in this forum and did not find solution. **

I have added normalizer to my existing index. So this is what did.

  1. created new_my_index witt my mappings.
  2. used reindex to copy data from old index to new one.
  3. drop the old index and create alias name of the old index that points to new index.

Despite of that normalizer isnt working.

here is my settings

"settings" : {
"index" : {
"number_of_shards" : "1",
"provided_name" : "new1_myindex",
"creation_date" : "1570653494679",
"analysis" : {
"normalizer" : {
"my_normalizer" : {
"filter" : [
"lowercase",
"asciifolding"
],
"type" : "custom",
"char_filter" :
}
}
}

for 2 of fields i have added my_normalizer

"keys" : {
"properties" : {
"key" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"value" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256,
"normalizer" : "my_normalizer"
}
}
}
}
},
"keyword" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256,
"normalizer" : "my_normalizer"
}
}

** yes keyword is my field name too :slight_smile: **

so in my documents i have 4 documents which has 'hat' .

image

when i search for 'hat' i get one result back. Any idea what am i doing wrong ?

well apparently there was no issue :slight_smile: my search term was 'hat' instead of 'hats' :slight_smile: