Open licaon-kter opened 4 years ago
You say even if not needed
. Can you define it further?
The way we order the results now is FuzzyScore. The greater the score, the lower the app. Each character you type will update the score.
Would you want to not compute score if the result list has only 2 matches?
I think he dislikes the fact the order changes when adding a character. However, it makes sense based on the way we store results -- see #285 and #608 :)
This is closed why exactly? Those two issues are marked as "fixed" but this looks broken.
I've used Syncthing before, I didn't even know that Orgzly had that thing.
Ok score, whatever, but why is "xxxxxxxxxx keyword" first and "keyword" second?
If the answer is "fuzzy score" I should rename this issue as "fuzzy score broken" and reopen? Else this doesn't make any sense.
but why is "xxxxxxxxxx keyword" first and "keyword" second?
"xxxxxxxxxx keyword" has 2 bonus scores.
Test code:
String input = "sync";
Log.i("test", "Input: `" + input + "`");
StringNormalizer.Result norm = StringNormalizer.normalizeWithResult(input, false);
FuzzyScore score = new FuzzyScore(norm.codePoints, true);
FuzzyScore.MatchInfo info;
String[] list = {"Orgzly: Sync", "Syncthing-Fork"};
for (String str : list) {
info = score.match(str);
Log.i("test", info.score + " score for `" + str + "` " + (info.match ? "matching" : "NOT matching"));
}
Output:
Input: `sync`
118 score for `Orgzly: Sync` matching
25 score for `Syncthing-Fork` matching
Maybe biasing this on "starts with keyword" is a better idea?
Not sure about you but I usually remember apps by name, the start of the name.
@saveman71 you looked into this recently, do you have an opinion?
First, I think the main concern is justified, i.e. there is a UX deception with results changing order at the last second.
Would you want to not compute score if the result list has only 2 matches?
I actually don't find this sooooo bad. However people might find it weird.
Now, on how to fix this specific issue: I think we should add a bonus "starts with", that would, in this case, checked with a new unit test, ensure that "Syncthing" is ranked higher than "Bla bla bla: Sync".
What do you think? I can draft a PR.
a UX deception
Right, so @TBog why is the score reversed on "syn" vs "sync", this is the strange part. Ok, put Syncthing second, but it should be second (or whatever lower than the other) from the start of the query.
Because with "syn", neither "Orgzly: Sync" or "Syncthing-Fork" have the full word bonus. With "sync", one whole word of "Orgzly: Sync" is matched so a bonus is applied.
but it should be second (or whatever lower than the other) from the start of the query
Why is this not the case, this I'm not sure. I can investigate.
Okay after reminding myself of the code, there is already a mechanism in place to negatively affect matches with a lot of characters before the first match, like "Orgzly: Sync".
So my
I think we should add a bonus "starts with"
is outdated.
This explains why at first, it's ranked lower, but once the full word bonus kicks in, it gets ranked higher. I believe we can tweak this.
Fullword, right, now I understand. I now see the reasoning behind the bonus.
Would you want to not compute score if the result list has only 2 matches?
Keep in mind most people have search providers, so they always have more results!
To me the most confusing part as a user is not that the order is illogical, but that it gets resorted without an obvious reason.
Would it maybe be useful to just resort if the score difference crosses some kind of threshold?
So no more progress?
I don't know if this option has been considered, but only allowing "filtering" for visible items, and not reordering would be a good idea. That would mean that "Mercado Pago" and "Mercado Libre" don't switch places at the last second. Probably this has to be a property of the sorting algorithm, and not explicit in code.
3.13.5 F-Droid
I'm trying to open an app (Syncthing) so I quickly type about 3 letters, the wanted result appears on screen, I eye it and muscle memory is ready to jump and touch the result
but the typing finger is too fast, my mind was thinking "sync" and the fingers got that command, the "c" is added, and I touch the first result as expected
Wat? Why did I open Orgzly instead?