Search: Has anyone implemented SpellChecker functionality using Lucene's API and Examine?
Looking for expert's help to implement 'Did you mean' functionality/ display search term recommendations to the user. I'd like to use the index files, that were already created by Examine on the application startup, to apply SpellChecker algorithm.
Example Usage from official documentation:
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
I've no idea about spellIndexDirectory, my_lucene_reader
Hey Bala
How are you? My Umbraoc version is 7+, and I'm using Lucene 2.9. When I install the Lucene.Net.Contrib.SpellChecker assembly, I see a number of dll issues in the umbraco version. Can you tell me how to fix this problem?
Search: Has anyone implemented SpellChecker functionality using Lucene's API and Examine?
Looking for expert's help to implement 'Did you mean' functionality/ display search term recommendations to the user. I'd like to use the index files, that were already created by Examine on the application startup, to apply SpellChecker algorithm.
Example Usage from official documentation:
I've no idea about spellIndexDirectory, my_lucene_reader
Versions:
Umbraco 7
Lucene 2.9
Lucene.Net.Contrib.SpellChecker assembly
References:
https://wiki.apache.org/lucene-java/SpellChecker
https://stackoverflow.com/questions/3118974/lucene-net-spellchecker-multi-word-phrase-based-auto-suggest
https://lucenenet.apache.org/docs/3.0.3/d2/dc5/classspellchecker11net11search11spell11spell_checker.html
Bala,
Check out excellent post by Lars on how to do this http://blog.aabech.no/archive/building-a-spell-checker-for-search-in-umbraco/
Bascially you need to build a spell checker index of your current index then you can hit that todo the spellcheck.
Thank you Ismail..! It worked :-)
Hey, do you know how to fix: TypeLoadException: Could not load type 'Assembly.SpellingIndexer' from assembly 'Assembly'.
You need to add the assembly Lucene.Net.Contrib.Analyzers to your project and configure it in ExamineSettings.config like below:
Note: SpellCheckIndexer is a custom indexer class I created in C_Umbraco.dll.
Hey Bala How are you? My Umbraoc version is 7+, and I'm using Lucene 2.9. When I install the Lucene.Net.Contrib.SpellChecker assembly, I see a number of dll issues in the umbraco version. Can you tell me how to fix this problem?
Would you kindly assist me?
is working on a reply...