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

pip search only finds whole-word matches #6842

Closed
stephen-dexda opened this issue Aug 7, 2019 · 3 comments
Closed

pip search only finds whole-word matches #6842

stephen-dexda opened this issue Aug 7, 2019 · 3 comments
Labels
C: search 'pip search' state: needs discussion This needs some more discussion type: enhancement Improvements to functionality

Comments

@stephen-dexda
Copy link

Environment

  • pip version: 19.2.1
  • Python version: 3.7.2

Description

pip search only returns results where the query term is a "whole word" in the package name or description (delimited by hyphen or space).

So e.g. pip search prometheus will find prometheus-foo, but not prometheus_client.

This issue was raised in #6309, which was closed as being a PyPi issue, however PyPi does succeed with the above query, contrary to one of the comments on that issue before it was closed/locked.

Related bug against PyPi: pypi/warehouse#5506

Expected behavior

pip search foo returns anything with the substring foo in the name or summary.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Aug 7, 2019
@chrahunt
Copy link
Member

PyPI uses a different query for requests from the website (here) vs the backend for the XMLRPC API that pip uses (here).

In the XMLRPC API backend implementation, it doesn't look like there's a mechanism for us to include a wildcard in any of the allowed fields (since "match" doesn't support wildcards per the docs).

I would also note that even the PyPI web search does not do a full substring query. For me, "zmd" returns zero results, but "zmzmd" returns the zmzmdr package.

@chrahunt
Copy link
Member

This may be better tackled as a topic on discuss.python.org (I didn't see anything existing for "search" or "discover") or in pypi/warehouse#6236. At least it needs to be clearer how people with a desire to improve things can contribute in this area.

@chrahunt chrahunt added C: search 'pip search' state: needs discussion This needs some more discussion type: enhancement Improvements to functionality labels Aug 11, 2019
@triage-new-issues triage-new-issues bot removed S: needs triage Issues/PRs that need to be triaged labels Aug 11, 2019
@pradyunsg
Copy link
Member

Closing this since pip search is no longer usable on PyPI: #5216

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: search 'pip search' state: needs discussion This needs some more discussion type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

3 participants