-
Notifications
You must be signed in to change notification settings - Fork 1k
Search method in XML-RPC API treats {"summary": "fix code"} as {"summary": ["fix", "code"]} #1886
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
Comments
We discussed this in today's Warehouse bug triage meeting and decided this is probably a small fix, we need to compare it to behavior on legacy PyPI, and we'll address it in the End User MVP milestone (probably in March). Thanks, @jwodder! |
@waseem18 I saw you're working on this? Thanks! Hope you'll join us in Freenode IRC in |
@brainwane Yeah I've started working on this an will put a WIP PR soon. |
Cause of this bug : In In
Above is a Resolution : Use Term query when the value of the given field has space(s) and #2850 is similar to this issue. Using Term query / @di @brainwane Will be happy to get your feedback on this. |
@waseem18 Using the Any reason why we wouldn't just use it for queries without whitespace as well? Seems like it wouldn't make much difference if the user is just searching for a single word. For #2850, it seems like we might actually want to do Phrase Matching instead, but let's just focus on this issue for now. |
Good catch @di Using |
Sure @brainwane I'll look into the comment you put on #2898 Regarding #2930 I'd be happy to help you on that. |
As stated in the title, the
search
method of PyPI/Warehouse's XML-RPC API splits the values of itsspec
argument on whitespace, resulting in the method returning (for the example in the title) packages with either "fix" or "code" in their summary, not just those with both "fix" and "code" (let alone just those that contain the exact string "fix code"). This happens even if thespec
value is passed as a one-element list (e.g.,{"summary": ["fix code"]}
), and while I haven't tested every field, it is not limited to just "summary".On the off chance that this is the intended behavior, the documentation should at least be updated.
The text was updated successfully, but these errors were encountered: