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.
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)