Commit Graph
3 Commits
Author SHA1 Message Date
Géry Debongnie 678ea26f99 [FIX] web: fix fuzzy search algorithm in app switcher
The fuzzy search score algorithm is quite simple, but had an interesting
problem: for the search string 'AB DEF', the result 'XXAXXBXXXXXXX DEF' had
a higher score than the result 'ABX X DEF", because it has 4 consecutive
matching characters.

This commit slightly tweak the algorithm to take space into account, but
to make sure they are not used to compound the score for a string.  This
means that space characters are not ignored, but are not really
as important as a normal character.
2017-02-28 15:01:24 +01:00
Géry Debongnie 782a4466fe [IMP] web: better fuzzy search
The goal of this commit is to have better search results when fuzzy
searching.  Before this commit, the position of a match was irrelevant
to the search results.  After, a match in a first position has more
weight than a match in last position.  This is better, because we often
want to find results using the first letters.

This is controversial, but I could not find a better way to do this
without rewriting the whole library myself (which might not be a bad
idea, it is only 50 lines long)
2016-05-04 14:46:46 +02:00
Yannick Tivisse f321466a69 [ADD] web: Library to make fuzzy searches
https://github.com/mattyork/fuzzy
2016-04-27 14:14:54 +02:00