Andy Stewart
Andy Stewart
Unfortunately @Fjan's patch above didn't make any difference for me on Rails 6.0.0 and Mail 2.7.1. However this patch worked for me: ```ruby # config/initializers/mail_patch.rb module Mail module Utilities def...
Still an issue on v0.9.4.
This is still an issue in v0.9.0.
This is still an issue in v0.9.2.
Still an issue in v0.9.4.
This works for me: in `Fuzzily::Model::Rails(2|3)`: ``` diff def _matches_for_trigrams(trigrams) self. select('owner_id, owner_type, count(*) AS matches, MAX(score) AS score'). group('owner_id, owner_type'). order('matches DESC, score ASC'). with_trigram(trigrams). - map(&:owner) + map...
Here's some code: https://github.com/airblade/fuzzily/commit/8b41888db5c70d15097d084ed8f2af89837f78c2. It's not as clean as my diff above due to having to work around the problem in #18.
I had assumed that `score` corresponded to the quality of the match. Can you give a couple of examples? I'm not particularly familiar with how trigram matching works.
Looking at the code, a trigram's score is simply the length of the word from which it came. The fuzzy finder orders its results by `matches DESC, score ASC`, where...
For normalising the score, how about: ``` (number of matches / number of trigrams for search text) / (1 + abs(score - score of search text)) ``` Let's say the...