smerriman Posted May 11, 2018 Report Share Posted May 11, 2018 Quoting from an older thread: The order of results is: Username is the search stringSearch string is a prefix of usernameSearch string is a prefix of real nameUsername sounds like search stringReal name sounds like search stringUsername or real name contains search string So if you remember the name correctly, the result you would have gotten with the old system will be at the top of the list.This simply isn't true. If I search for 'barma', the first person is a username named 'BarMa' (correct). The second is a username 'Brownm' with real name 'Janice Brown' which implies the second step in priority is being skipped entirely. barmar doesn't appear anywhere on the list at all. If it worked as described above it would be far better. Though I think Levenshtein distance would be an improvement over sounds like. Quote Link to comment Share on other sites More sharing options...
barmar Posted May 11, 2018 Report Share Posted May 11, 2018 This simply isn't true. If I search for 'barma', the first person is a username named 'BarMa' (correct). The second is a username 'Brownm' with real name 'Janice Brown' which implies the second step in priority is being skipped entirely. barmar doesn't appear anywhere on the list at all.You're right, username soundex is ahead of username prefix. I don't remember if this was intentional or I just put them in the wrong order in the code. Here's the order in the code: WHEN 0 THEN 'username exact' WHEN 10 THEN 'realname exact' WHEN 20 THEN 'ACBL TD' WHEN 30 THEN 'username soundex' WHEN 40 THEN 'username prefix' WHEN 50 THEN 'realname prefix' WHEN 60 THEN 'realname soundex' ELSE 'other'If it worked as described above it would be far better. Though I think Levenshtein distance would be an improvement over sounds like.Maybe, but it's practically impossible to implement as an efficient query. We can store a soundex value in an indexed table, Levenshtein would require a scan of the entire table. Quote Link to comment Share on other sites More sharing options...
barmar Posted May 11, 2018 Report Share Posted May 11, 2018 My earlier thread was wrong, this is the order we intended. It's hard to get an ideal result. If we prioritize the prefix, there will usually be so many matches that we never get to the soundex. And vice versa. It's still better than what we had before, which only found exact matches. Quote Link to comment Share on other sites More sharing options...
smerriman Posted May 11, 2018 Author Report Share Posted May 11, 2018 It's hard to get an ideal result. If we prioritize the prefix, there will usually be so many matches that we never get to the soundex. And vice versa.I don't think that's really a problem. All of the times I have searched for a uesrname, I remember the start but not the rest. And I have never once seen a useful soundex result in the list. So to me, while it's no worse than the original, it's also no better. Having prefix first would make it far more useful. In fact, I challenge you to come up with an example of where the results are useful :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.