** 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.
- created new_my_index witt my mappings.
- used reindex to copy data from old index to new one.
- 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 **
so in my documents i have 4 documents which has 'hat' .
when i search for 'hat' i get one result back. Any idea what am i doing wrong ?