CyberCRI / learn-ext

WeLearn Browser Extension
https://welearn.cri-paris.org
MIT License
11 stars 1 forks source link

Fuzzy text search is way too fuzzy! #37

Open prashnts opened 5 years ago

prashnts commented 5 years ago

The thresholds used in fuse.js initialization is not very useful. The value 0.5 matches a lot of text that it should not. Example:

Query: [ nugget ]

Matches:

  noughat
  ^  ^  ^   Edit distance > 2

  biggest
    ^^^ ^

  rugged
   ^^^^

  bugger
   ^^^^

Clearly, the fuzziness is useless in such cases because it does not weight the position of matches.

Thankfully this is implemented in fuse.js, we only need to configure it correctly.