Fuzzy Matches and Stemming

Borys Sokolov
Member since: 2014
 

Hi!

I use Find v13.0.1 and Find.Commerce v10.2.0

Let's say I want to search though Variations:

var variationSearchResult = Search().For(searchQuery)
.InField(variation => variation.DisplayName)
.AndInField(variation => variation.Description.AsViewedByAnonymous())

I want to have the exact matches for the DisplayName on the top. Afterwards I want to have the exact matches for the Description. And in the end there should be some results with not exact matches for Display name - so it is ok to have there misprints, stemming, etc.

So basically I thought that something like this can solve this problem:

 .BoostMatching(variation => variation.DisplayName.Match(searchQuery), 13)
 .BoostMatching(variation => variation.DisplayName.MatchFuzzy(searchQuery), 0.1)

But I don't like the results I am getting. For example, some stemming items may appear quite high in the list. The worst thing here is that stemming can work quite badly for Dutch language suggesting completely different words...

#197309 Sep 28, 2018 21:42
  •  

    Stemming in Dutch returns so many false positives, I've turned it off in one project, by using  .UnifiedSearch(Language.None).

    #200896 Jan 30, 2019 11:45