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

Support rpm name substring filtering #3135

Closed
jlsherrill opened this issue May 3, 2023 · 4 comments · Fixed by #3137
Closed

Support rpm name substring filtering #3135

jlsherrill opened this issue May 3, 2023 · 4 comments · Fixed by #3137

Comments

@jlsherrill
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When listing rpms, i'd love to be able to filter based on the substring of a package name:

Describe the solution you'd like

GET /pulp/api/v3/content/rpm/packages/?name_match="kernel"

using a wildcard of some sort would allow the user to control if its only at the start "kernel*" or anywhere in the name "kernel"

Describe alternatives you've considered
The less flexible version would be:

GET /pulp/pulp/api/v3/content/rpm/packages/?name_substring="kernel"

Additional context
This would allow for easier filtering to find matches for a user's search.

@dralley
Copy link
Contributor

dralley commented May 4, 2023

The less flexible version is trivial, a one line change we can implement in seconds. The full "matching" would be more challenging, I think. Would it be useful to go ahead and make the first available as an interim measure?

@jlsherrill
Copy link
Contributor Author

you could always support name_substring & name_startswith separately. That probably covers most all cases

@dralley
Copy link
Contributor

dralley commented May 4, 2023

I can do that. Should we keep this open in hopes of a full implementation later?

@jlsherrill
Copy link
Contributor Author

jlsherrill commented May 4, 2023

I think if both of those simple filters are implemented, this issue could be closed.

dralley added a commit to dralley/pulp_rpm that referenced this issue May 4, 2023
dralley added a commit to dralley/pulp_rpm that referenced this issue May 4, 2023
dralley added a commit to dralley/pulp_rpm that referenced this issue May 4, 2023
dralley added a commit that referenced this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants