After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339595 - [Patch] Improving basic search
[Patch] Improving basic search
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks: 331831 335962
 
 
Reported: 2006-04-24 16:30 UTC by Don Scorgie
Modified: 2006-05-14 10:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Improve search (11.02 KB, patch)
2006-04-24 16:42 UTC, Don Scorgie
committed Details | Review

Description Don Scorgie 2006-04-24 16:30:09 UTC
Attached in a minute, complete with description
Comment 1 Don Scorgie 2006-04-24 16:42:18 UTC
Created attachment 64219 [details] [review]
Improve search

The patch does various things: (in some order)
1. Only match whole words (no more matching "go" in "google")
2. Tweaked results to give more weight to results that have > 1 term (i.e. searching for "CD Player" will give more weight to docs that contain both "CD" and "Player")
3. With > 1 search term, only search for man / info pages that have the exact term which reduces the time for searching > 1 term by quite a lot and reduces the number of man / info results
4. Reworked man result parser that not only picks up more of the results but is also simpler
5. Allow different windows to perform searches in parallel (if your quick enough to get 2 going at once)
6. Make the search box respond to "man:<foo>", "info:<foo>" and "man foo" by going directly to the relevant man or info page (doesn't work with "info <foo>").  If the search is for "man foo bar", a full search is performed.
7. Probably some more things I've forgotten about

This (should) fix most of the bugs that people have so far filed about basic search.

I'd like people to test this a bit, see if it returns better results etc. before I commit.  Any comments appreciated.  The various weightings given to things should / could probably be tweaked a little more.
Comment 2 Brent Smith (smitten) 2006-04-28 04:34:00 UTC
seems to work fine here.  I say commit it. :-)
Comment 3 Don Scorgie 2006-05-11 18:11:36 UTC
Patch has been committed to HEAD.  Closing.
Comment 4 Sebastien Bacher 2006-05-11 21:49:22 UTC
Don, do you think that patch would be somebody Ubuntu should ship with the dapper package?
Comment 5 Brent Smith (smitten) 2006-05-12 03:44:41 UTC
Sebastien, it hasn't seen much testing, but it does provide much better results, but searching also takes longer.  I don't think we would consider applying to the gnome-2-14 branch since it has seen minimal testing.
Comment 6 Duncan Lithgow 2006-05-13 20:31:46 UTC
a search for "log rotation" gives 211 results, none of them with the word "log" alone, and none with the word "rotation". That's maybe not so useful and doesn't match 2. above.

a search for "configuration file" gives 1070 results, mostly for the word "file". I can't see any where both words are highlighted, although there are some entries further down which have both words, for example in 'xorg.conf manual page'. That doesn't seem to match point 2 above either.

a search for "config" shows up lots of result for configuration, which is quite right and good. I guess that's a fallback in the absence of values with only "config".
Comment 7 Sebastien Bacher 2006-05-14 10:10:04 UTC
Comment on https://launchpad.net/distros/ubuntu/+source/yelp/+bug/30819 about the new behaviour:

"The last package much improved the search results. Thanks!

There are still a few gotchas though:

1) Searching for "printing" gives me a *lot* of duplicate results. ~30 or more for "coreutils info page" fx.

2) It appears that only one word are mathced per result. Fx. if I search for "dvd playback" the section Common Tasks->Video->DVD Playback (of Ubuntu Desktop Guide) does not show up in any results. I do get results matching dvd *exclusive or* playback though.

Should I file separate bug reports on these issues?"