Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bala Gudibandla 12 posts 131 karma points
    Jul 05, 2017 @ 21:23
    Bala Gudibandla
    0

    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

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jul 06, 2017 @ 15:25
    Ismail Mayat
    100

    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.

  • Bala Gudibandla 12 posts 131 karma points
    Jul 06, 2017 @ 20:33
    Bala Gudibandla
    0

    Thank you Ismail..! It worked :-)

  • Michaela Ivanova 12 posts 104 karma points
    Feb 20, 2018 @ 08:28
    Michaela Ivanova
    0

    Hey, do you know how to fix: TypeLoadException: Could not load type 'Assembly.SpellingIndexer' from assembly 'Assembly'.

  • Bala Gudibandla 12 posts 131 karma points
    Feb 20, 2018 @ 15:11
    Bala Gudibandla
    0

    You need to add the assembly Lucene.Net.Contrib.Analyzers to your project and configure it in ExamineSettings.config like below:

    <add name="SpellCheckIndexer" type="Our.Umbraco.ezSearch.SpellCheckIndexer, C_Umbraco"
                     analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
    

    Note: SpellCheckIndexer is a custom indexer class I created in C_Umbraco.dll.

  • YESU RAJA CHINTA 22 posts 89 karma points
    Oct 12, 2022 @ 18:09
    YESU RAJA CHINTA
    0

    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?

Please Sign in or register to post replies

Write your reply to:

Draft