Closed Ushie closed 2 months ago
Someone fix deploying, I want to see a preview.
Deployed at https://head.revanced.pages.dev.
Deployed at https://d455e42c.revanced.pages.dev.
this ALMOST LGTM. the only thing is that for some reason if you clear the search string, the parameter in the url doesn't clear. if nobody figures out why this happens by tonight i'll try to fix this.
resolved in #230
Deployed at https://987be635.revanced.pages.dev.
I am not sure what kind of parameters cause this, but if i search for video ads, it should not show other results present here
that's what happens when you have both "adds" and "video" in the description of a patch. now that normally wouldn't be a problem, but the ones that actually have "video ads" in the title are being downranked. that will have to be fixed...
Can a threshold be used? This way results with a low threshold, weighted down by results with high matches can be hidden
Some threshold needs to be adjusted, too many irrelevant results or incorrect ones show up
@oSumAtrIX I just checked, and the exact same first search results show up on the non-fuzzy version. I think it's worth deploying now, as it makes some situations better without making any worse.
If you scroll down on the fizzy search you will find many results that hardly match the search, the thresholds may be adjusted for that. The fuzzy search should slightly aid the search on variations of searches such as spelling mistakes, casing, spaces or characters, and not match results that are hardly expected to show up.
Well that's a tough one. I see a couple options to add a minimum score:
Which one would you prefer?
The first and last option are the only reasonable ones
FYI looks like someone already tried to contribute scores and it hasn't been merged: https://github.com/wouterrutgers/fuzzy-search/pull/82/files If inlining is still out as an option, we'll have to switch to another library like Fuse. Fuse doesn't have the smallest bundle size (15kb bundled uncompressed, since it uses classes) but it's popular and would work.
If there is a fork already, we can use it if it is rebased on upstream (use a commit hash for the dependency and link the PR)
Instead of fuze due to its size you should use the fork
I notice Fuse providing more relevant results, so I think we should use it anyway. It's only a 4kb increase from the previous library over the wire.
Without Fuse:
With Fuse:
Why does Fuse show different results though? Isn't the algorithm the same?
No, not all fuzzy search algorithms are the same. I haven't checked all the differences, but the most useful thing I see fuse doing is relying on shorter fields (eg title) more than longer fields.
Deploying with
Cloudflare Pages
c4c4055
View logs