+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sitefinity Search and Word Substitution

Sitefinity Search and Word Substitution

4 posts, 0 answered
  1. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    16 Sep 2010
    Link to this post
    Hello,

    We recently had a client request the ability to have particular words in the search, which differ in spelling depending on region (such as color, or labor), replaced with the version used in the content on the site. This would allow the search to accept "colour" as "color". Does Sitefinity have anything built in that handles this, or would this be a function of a custom search index?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Sep 2010
    Link to this post
    Hi Travis,

    Lucene supports fuzzy searches based on the Levenshtein Distance. You can gather more information at

    Apache Lucene - Query Parser Syntax
    Class FuzzyQuery

    I attached a sample video that shows how this works.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    16 Sep 2010
    Link to this post
    Thanks Ivan.

    In this case I would have to add the tilde to the end of my search string, correct? If so, I'm not sure that this will work in my particular case. The client requires that no additional syntax be added to the search term, however, since there is terminology specific to their industry which they want to do word substitution with, it may just be as simple as intercepting the search query and modifying the search terms. I just wanted to confirm that this behavior wasn't built into Sitefinity already.

    Thanks again for your assistance.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Sep 2010
    Link to this post
    Hello Travis,

    The query is read from the query string, so on submit you could modify it and put a "~" in it which will not require using it inside input field.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered