Home » Getting started » Configuring » General » Fuzzy search similarity settings
In the Web.Config file you can now specify the degree of “fuzziness” of a fuzzy search query by editing the backOfficeFuzzySearchSimilarity and publicSiteFuzzySearchSimilarity.
The similarity is a value between 0 and 1 (the lower the value, the more fuzziness) with the default setting 0.5.
<search enableChangeTracking="true"
enableDailyOptimization="false"
dailyOptimizationTimeOfDay="12:00:00"
backOfficeFuzzySearchSimilarity="0.5"
publicSiteFuzzySearchSimilarity="0.5" />
In order to generate a hit, the distance between an indexed term X and a search term Y must be less or equal than: The length of Y * “MinimumSimilarity”, where “MinimumSimilarity” is defined as (1-SearchSimilarity). The distance (Levenshtein distance) is measured in the number of additions, deletions or modifications needed for the terms X and Y to be identical.
Sample 1
The misspelled word “assorment” has the distance of 1 versus the word “assortment”
assorment → assortment (insert 't' in the middle)
Length of “assortment” is nine characters
Given the formula we get Distance(1) < (Length(9) * (1-Similarity(0.8)) → 1 <= 1.8 is TRUE
But if the misspelled word is “assormennt” it has the distance of 2 and will not hit since 2<= 1.8 is false.
assormennt → assortmennt (insert 't' in the middle)
assortmennt → assortment (remove the extra 'n')
To get a hit on this you would have to set the similarity to 0.7 (2 <= 2.7)
Sample 2
The misspelled word “bygga” has the distance of 1 versus the word “mygga”
bygga → mygga (replace 'b' with ‘m’)
Length of “mygga” is five characters
Given the formula we get Distance(1) < (Length(5) * (1-Similarity(0.8)) → 1 <= 1 is TRUE
But if the misspelled word is “brygga” it has the distance of 2 and will not hit since 2< 1 is false.
brygga → mrygga (replace 'b' with ‘m’)
mrygga → mygga (remove 'r')
To get a hit on this you would have to set the similarity to 0.6 (2 <= 2)
Comments made
No comments are made
You need to be logged in to make a comment