Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag autocomplete fuzzy matches on both sides of input #2916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hammeiam
Copy link

@hammeiam hammeiam commented Nov 16, 2022

Problem: Tags currently only autocomplete based on a fuzzy match after the user's input, eg SQL("INPUT%"). This leads to users needing to do a lot of unnecessary typing in order to find their desired tag. This is further compounded by the fact that many users employ an information hierarchy in their tags eg Location: USA: Ohio: Cleveland. This means that a user wastes a lot of time typing because they can't just autocomplete "Cleveland" to the appropriate set of tags.

Solution: Simply fuzzy match on both sides of the user input, eg SQL("%INPUT%"). Per dstillman's feedback, this change is behind the user-set flag unboundedTagSearch, which defaults to false.

Screen Shot 2022-11-15 at 4 50 12 PM

@dstillman
Copy link
Member

I mean, it's not a bug — it's left-bound because that's an indexed search, and otherwise it's not.

We'll need to do some performance tests in large libraries to see how it performs non-left-bound on modern computers. We likely haven't tested this in years, but historically searches were slow in large libraries with many tags. And if that's still the case, we'd only do this either 1) as a pref, defaulting off or 2) if we added a separate word index on tags.

@quinn-p-mchugh
Copy link

as a pref, defaulting off

I would love to see this implemented as a preference, defaulting to off. Let the users decide whether the performance hit is acceptable.

@jankap
Copy link

jankap commented Feb 20, 2023

Would love to see this search happening :) Can I test something? I have a real-life lib with ~400 items

@hammeiam
Copy link
Author

@dstillman I put this change behind a user flag so people can turn it on if they choose.

@dstillman dstillman force-pushed the master branch 2 times, most recently from 2cad5b0 to 08213eb Compare May 21, 2023 22:56
@quinn-p-mchugh
Copy link

quinn-p-mchugh commented May 26, 2023

Thanks for your work @hammeiam. Is this able to be reviewed/merged?

@hammeiam hammeiam reopened this Aug 29, 2023
@hammeiam
Copy link
Author

@quinn-p-mchugh @dstillman rebased changes against latest main

@hammeiam
Copy link
Author

@dstillman Congrats on the great looking beta launch! I think it is the perfect opportunity to add this quick enhancement :)

@rossant
Copy link

rossant commented Apr 20, 2024

I agree this would be a great enhancement, I hope it will be merged soon :)

@hammeiam
Copy link
Author

Hi @dstillman - just removed conflicts, ready to merge whenever you are :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants