beekeeper-studio icon indicating copy to clipboard operation
beekeeper-studio copied to clipboard

Fuzzy find in command palette

Open valtism opened this issue 1 month ago • 2 comments

Replace flexsearch with match-sorter to allow fuzzy finding in command palette

Closes https://github.com/beekeeper-studio/beekeeper-studio/issues/3266

valtism avatar Dec 10 '25 07:12 valtism

I don't code in Vue, so please double check my work here. I've tested this locally and it all seems to work.

I've used match-sorter instead of flexsearch since the latter does not support substring matching because it's architecture means it processes char-by-char.

valtism avatar Dec 10 '25 07:12 valtism

@valtism Thanks so much for this! I'm going to mention this to the team just to make sure no one has any issues with switching, but I've given this a test with one of my load test dbs and it performed well!

The only issue I can see right now is that quicksearch doesn't highlight the matches properly for fuzzyfinding. Here's a fuzzy match: image Whereas this is how I'd want it to highlight: image Fully sequential matches still highlight: image

If this isn't something you'd want to work on, no worries. Just want to make sure it's at least documented.

not-night-but avatar Dec 11 '25 21:12 not-night-but

That's a good point. I'll look into implementing that now

valtism avatar Dec 12 '25 03:12 valtism

@not-night-but I've switched out match-sorter to microfuzz because it supports match ranges and have used them to highlight characters in the search titles. Let me know if that looks good

valtism avatar Dec 12 '25 06:12 valtism

@valtism How did you choose this library? I'm not totally sold on microfuzz, as it doesn't seem to be super popular and hasn't been updated in a while. What about something like uFuzzy?

not-night-but avatar Dec 12 '25 18:12 not-night-but

@not-night-but Yeah, hadn't really used it so just picked it as something that supported highlights, but uFuzzy seems better. I've replaced it with that and also moved the highlighting to the search module so it returns the highlight formatted (and escaped) string directly. Hope that works

valtism avatar Dec 13 '25 03:12 valtism