lp.project_groups.search doesn't return a result for exact matches

Bug #390922 reported by Jamu Kakar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Brad Crittenden

Bug Description

I was writing some launchpadlib-using code today that uses
launchpad.project_groups.search to get a project group object. I
was perplexed when searching for 'landscape-project' (an existing
project group) returned None. After some experimentation I
discovered that passing 'landscape' would return two matching
project groups, one of with was 'landscape-project'.

I would expect that passing in an exact match would return a
collection with, at the least, the project with the same name.

Tags: lp-registry

Related branches

Jamu Kakar (jkakar)
summary: - lp.project_group.search doesn't return a result for exact matches
+ lp.project_groups.search doesn't return a result for exact matches
Revision history for this message
Diogo Matsubara (matsubara) wrote :

This looks like a dupe of bug 29227
Moving to -registry for Curtis consideration.

affects: launchpad → launchpad-registry
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Curtis Hovey (sinzui) wrote :

I think there is something insane going on in the search() method. It has a default of search_products=True, which causes the search to look for subprojects, not the project. I think we need ask why this is the default beahviour? I suspect someone wanted to see more results. The right answer might be:

    UI: search projects UNION projectgroups
    API: search projects

Revision history for this message
Barry Warsaw (barry) wrote :

Assigning to me. Time box to 2 hours.

Changed in launchpad-registry:
milestone: none → 2.2.8
assignee: nobody → Barry Warsaw (barry)
Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: Barry Warsaw (barry) → nobody
milestone: 2.2.8 → none
Revision history for this message
Curtis Hovey (sinzui) wrote :

Brad, This is the project group search bug that I think you rediscovered

Changed in launchpad-registry:
assignee: nobody → Brad Crittenden (bac)
milestone: none → 3.1.11
Revision history for this message
Brad Crittenden (bac) wrote :

I agree the results reported via the API are confusing. I think Jamu would be equally confused if he performed a search from the web for 'landscape-project' and got no results.

In my opinion, the behavior when using 'search_products=True' is unintuitive and the option should be removed.

Brad Crittenden (bac)
Changed in launchpad-registry:
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: In Progress → Fix Committed
Brad Crittenden (bac)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.