Add Synonym Analyzer for Keyword field

Hi everyone,

I am stuck here for adding Synonym Analyzer to Keyword field while creating my index.
Can you please help how can I achieve this or what am I missing?

Use case:
A person can have multiple nick names. If search is made on nick name it should match the record with personname field.

My custom analyzer:

"synonym_keyword_analyzer":{
"tokenizer": "keyword",
"filter":["synonym",
"lowercase"]
}

Field Mapping:

"personname" : {
"type" : "keyword",
"analyzer":"synonym_keyword_analyzer"
}

Error:
Mapping definition for [personname] has unsupported parameters: [analyzer : synonym_keyword_analyzer]

Any help is appreciated

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.