hst icon indicating copy to clipboard operation
hst copied to clipboard

Fuzzy search

Open umitdincel opened this issue 9 years ago • 1 comments

Previous algorithm was only searching for full word. With fuzzy search algorithm we are also able to find words with absent characters in it.

Complex is better than complicated.

when you search cmplx the algorithm is able to identify complex word in this text.

You can see my python code in the link below https://gist.github.com/umitdincel/89960b4f9c302c604443

umitdincel avatar Jan 04 '16 00:01 umitdincel

@umitdincel thanks for the pull request, but there are a few things about this.

i. when we make this kind of match, it takes a while to get suggestions. i can't easily type in "ssh myserver" because my history is between ~30k-50k lines. i am not sure if this is the most used case, but it completely ruins my user experience :) that was the main reason i didnt add fuzzy search in the first place.

maybe we can add fuzzy search, if the data is not that much, but that adds inconsistency. or we can add a flag to enable fuzzy search ? what do you think ?

ii. the default is weighting by occurence, but i think this bypasses that - eg: if i have a ton of "ssh someserver" in my history, i expect to see "ssh someserver" but this brings in "ssh someserver someserver" because its a better match :)

iii. also i see many false positive search results with this, see https://www.evernote.com/shard/s29/sh/d753e08c-2b22-439c-b6a3-ae75286a1830/d3d4a2c14b512db0/res/bed44491-9b3c-4cd5-9685-2b9df8b21b44/skitch.png app.py is the exact match but for some reason its below some app-holidays.py

please don't hesitate to comment or discuss.

thank you.

ybrs avatar Jan 04 '16 13:01 ybrs