Developer forum

Forum » CMS - Standard features » SynonymAnalyzer in Index

SynonymAnalyzer in Index

Nuno Aguiar
Reply

Hi,

 

How could I add a Synonym Analyzer to my index?

 

A customer is asking for a replacement list, for example "4" = "four". I am guessing the Synonym Analyzer would be the best option, unless anybody has a better idea.

 

My only other idea is to process the serch term in javascript, make the necessary replacements and them submit the search, but I was trying to avoid it.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

If you implement a Lucene.Net.Analysis.Analyzer and upload it to your solution, it will show up in the index setup, and you can use your own implementation to analyze the data going into the index. See dump.

The StopAnalyzer from Lucene which filters common english words is already in Dynamicweb. Here is the implementation of that: https://lucenenet.apache.org/docs/3.0.3/d7/df5/_stop_analyzer_8cs_source.html - it calls the https://lucenenet.apache.org/docs/3.0.3/db/d6a/_stop_filter_8cs_source.html and removes the words. You need to replace the words.

So if you make your own implementation, you can add whatever you want.

Capture.PNG
Votes for this answer: 1
 
Nuno Aguiar
Reply

Hi NIcolai,

 

Great thanks. I will take a look at that.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum