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

Should package search be case sensitive? #327

Open
lucasgarfield opened this issue Feb 23, 2022 · 5 comments
Open

Should package search be case sensitive? #327

lucasgarfield opened this issue Feb 23, 2022 · 5 comments

Comments

@lucasgarfield
Copy link
Contributor

Most package names are all lower case, but some package names do have capital letters. Consider the package NetworkManager. At the moment making a request for networkmanager will not yield NetworkManager in the response. I propose that the package search should be case insensitive.

@ondrejbudai
Copy link
Member

I like this idea, do you want to look into it?

@lucasgarfield
Copy link
Contributor Author

Yes, I will look into it and submit a PR and we can evaluate from there!

@teg
Copy link
Member

teg commented Feb 23, 2022

One thing to keep in mind: ideally we would push the searching down to dnf eventually, rather than do it ourselves. So let's check that dnf supports whatever features we add, so that such a refactor would be transparent to the user.

@lucasgarfield
Copy link
Contributor Author

lucasgarfield commented Feb 23, 2022

I think performing case insensitive search may actually bring us closer to dnf's behavior:

https://dnf.readthedocs.io/en/latest/command_ref.html#search-command

Search Command
Command: search
Aliases: se

dnf [options] search [--all] <keywords>...Search package metadata for keywords. Keywords are 
matched as case-insensitive substrings, globbing is supported. By default lists packages that 
match all requested keys (AND operation). Keys are searched in package names and summaries. 
If the “–all” option is used, lists packages that match at least one of the keys (an OR operation). 
In addition the keys are searched in the package descriptions and URLs. The result is sorted from 
the most relevant results to the least.

@teg
Copy link
Member

teg commented Feb 23, 2022

Perfect! Thanks for checking :)

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

3 participants