including a number in Launchpad bugs search causes search to fail

Asked by Nathan Stratton Treadway on 2010-10-12

I'm trying to understand the behavior of the Launchpad "Search Bug Reports" feature.

I'm using the search box on
  https://bugs.launchpad.net/
, and attempting to locate a particular bug, in this case LP #658227. The description of that bug is currently set to

upgrade process does not upgrade underlying BDB format from 4.7 to 4.8 (so slapd aborts with "Program version 4.8 doesn't match environment version 4.7" error message)

(The bug is still open/active, and is not marked as a duplicate.)

If I leave the radio button next to "All projects" selected, and enter "Program version 4.8
doesn't match environment" into the search box (cut-and-pasting from the bug description to make sure the spelling is correct)... I get back no bugs at all.

However, if I go Back and then remove the "4.8" from my search text, so that I have "Program version doesn't match environment"... I do get back my bug (as well as two others that also contain a similar message.

Why does adding the number to the search string cause the search to fail?

Is there any documentation about how the search text is "parsed" in the Launchpad bug search?

Thaniks.

Nathan

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Gavin Panella
Solved:
2010-10-14
Last query:
2010-10-14
Last reply:
2010-10-13
Best Gavin Panella (allenap) said : #1

Hi Nathan,

It looks like a bug, so I've filed bug 659870 about it.

Thanks for letting us know!

Gavin.

Great, thanks.

I'm still curious to know if there is any documentation anywhere about how the bug search text is parsed/used.

In my experiments, it seems that the search hits were bugs that had most-but-not-necessarily-all of my search words in the summary or description, and that the order of the words in the search text didn't actually matter.

Is there any way to do an exact phrase search, or to eliminate bugs that include a particular word, etc.?

Gavin Panella (allenap) said : #3

In lp:launchpad (or lp:launchpad/devel, which is the more common development target for us) there's a _buildSearchTextClause() method on BugTaskSet in lib/lp/bugs/model/bugtask.py that constructs some query clauses that use some full text indexes in PostgreSQL. I don't know much about how PostgreSQL's FTIs behave but I suspect that's where things are going wrong.

So are you saying that the search text I enter is passed almost directly to the PostgreSQL full-text search (except for the quoting that I see done there in _buildSearchTextClause()), and thus that any special search features that might be available to the users are provided by PostgreSQL, and not by logic encoded in Launchpad itself? I'll see what documentation I can find on those full-text searches.

In any case, I take it that you don't know of any help page documenting the operation of the Bug Search from the users point of view? If not, I might go ahead and open a wishlist bug about that, too.

Gavin Panella (allenap) said : #5

> So are you saying that the search text I enter is passed almost
> directly to the PostgreSQL full-text search (except for the quoting
> that I see done there in _buildSearchTextClause()), and thus that
> any special search features that might be available to the users are
> provided by PostgreSQL, and not by logic encoded in Launchpad
> itself? I'll see what documentation I can find on those full-text
> searches.

Yes, that's how I understand it.

> In any case, I take it that you don't know of any help page
> documenting the operation of the Bug Search from the users point of
> view? If not, I might go ahead and open a wishlist bug about that,
> too.

I don't know of any. I quickly checked https://help.launchpad.net/ and
there's no sign of any there. It would be great if you could file a
bug about it.

Okay, thanks, I'll do that.

All right, I've opened LP: #660283 regarding the lack of documentation for the bug-search expressions.

Thanks Gavin Panella, that solved my question.