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

Make fuzzy search ignore case by default #5119

Open
carreter opened this issue Feb 23, 2024 · 2 comments
Open

Make fuzzy search ignore case by default #5119

carreter opened this issue Feb 23, 2024 · 2 comments

Comments

@carreter
Copy link

Proposed solution

string_match method for FuzzyQuery should ignore case by making both pattern and value being matched against lowercase.

Objective

Goals

Make fuzzy searching... fuzzier. I don't see a scenario where one would want a fuzzy search but care about capitalization.

Alternative would be to make this behavior toggleable in the config or to have a different prefix for case sensitive vs case-insensitive fuzzy matching.

Non-goals

N/A

Anti-goals

This could result in unexpected behavior if a user depends on capitalization during fuzzy searching, but I don't see why one would.

@mirkosoft
Copy link

To be on the safe side, it might work similar to "smart case" in vim: it's ignoring case by default (assuming user's input is lowercased usually), but as soon as user put the uppercased char, case won't be ignored anymore.

@carreter
Copy link
Author

Smartcase is the current behavior, but I don't think I agree with it.

We are already fuzzy-searching, so the situations where the user would care about case seem quite rare. It's far more likely that they wouldn't care, and that smartcase would just make things more confusing.

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

No branches or pull requests

2 participants