Commit b5419ed
Dashboard: make the search less fuzzy (codesandbox#1866)
At the moment, the search algorithm is too fuzzy in my opinion.
First, it give too much importance to the match being at the beginning of the text. This is why I've increased the distance from 100 (default) to 1000.
Then (and more importantly), it accepts matches that are pretty far. For instance, if I search for `"music"` it will match `"MUI icon bug" or even more surprisingly `"unistore-rsm"` 🤔. This is why I've decreased the threshold from 0.6 (default) to 0.1. I came up picking this number after outputting the score of each match.
Please try it on your dashboard and let me know if those settings sound reasonable.1 parent 9b83866 commit b5419ed
File tree
1 file changed
+2
-0
lines changed- packages/app/src/app/pages/Dashboard/Content/routes/SearchSandboxes
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
0 commit comments