Open hckiang opened 1 year ago
I think this function here could look like this:
public static func match(nameWithCategory: String, searchText: String) -> Bool {
let querywords = searchText.split {!($0.isLetter || $0.isNumber || $0 == ".") }
for str in querywords {
if nameWithCategory.localizedCaseInsensitiveContains(str) {
return true
}
}
return false
}
I have been using the app for years but now as my password store grows bigger, the search algorithm now can seldom find the entry that I want. For example, when I type
Pinboard
in the search box these are the first few file names that matches:In the above, it seems that
in
is matchingPinboard
. The 'most sensible' entrypinboard.in
is at the 18th position.Another example: the query
Facebook
will actually match the file nameBCM e-banking
, which IMHO is too fuzzy. I suspect this is some Levenshtein distance algorithm(?)QtPass, on the other hand, appears to just tokenises the search query then find file names that matches any one of the tokens. It isn't perfect but most of the time it can find the thing that I need in one go.
Any chance this can be improved?