Copied to clipboard

Flag this post as spam?

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


  • Mark 255 posts 612 karma points
    Sep 23, 2010 @ 14:57
    Mark
    0

    Umbraco Examine - Indexers

    Hi

    I'm using Umbraco 4.52 and have successfully set up Examine search within a customer website.

    The customer has reported that he is unable to search on non-plural versions of words. E.g. he has a field that contains the word Nationals, but when he searches on National he gets no results, even though he does when searching on Nationals.

    I understand the StandardAnalyzer, which is being used in this project, simply breaks up textual content on whitespace characters (feel free to point out if this is incorrect), so when indexed, words are indexed as found in the document, plural or not.

    I've looked at other analysers and can't see any that seem to further break up words when an s is found at the end, i.e. finds Nationals and stores National and Nationals in the index. Is possible to do this with one of the Analyzers? Or is there some other way of getting around this issue?

    Any advice would be very much appreciated!

  • Aaron Powell 1708 posts 3044 karma points c-trib
    Sep 23, 2010 @ 15:29
    Aaron Powell
    0

    There's no OOTB analyzer for Lucene that will handle pluralization for you, but you can use the PorterStemFilter (http://lucene.apache.org/java/2_9_2/api/all/org/apache/lucene/analysis/PorterStemFilter.html) in a custom analyzer to achieve it.

    Google has found me this: http://stackoverflow.com/questions/1192671/how-to-enable-stemming-when-searching-using-lucene-net

  • Mark 255 posts 612 karma points
    Sep 23, 2010 @ 15:47
    Mark
    0

    Many thanks slace. I thought it might be down to using one of the filters, although I wasn't sure which one.

    I'm going back to the customer to ensure this really is a requirement as he'll need to pay for the additional development :)

    If he does then I'll be sure to look into your solution and may come back here for some further advice.

    Thanks again!

  • Connie DeCinko 931 posts 1159 karma points
    Sep 28, 2011 @ 23:07
    Connie DeCinko
    0

    I realize this thread is just over a year old, however the topic is still valid.  Has any progross been made with the latest version of Examine to get it to handle plurals out of the box?

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies