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 747061 - Search sometimes has poor results.
Search sometimes has poor results.
Status: RESOLVED OBSOLETE
Product: gnome-characters
Classification: Other
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Characters maintainer(s)
GNOME Characters maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-30 21:33 UTC by Aaron Paden
Modified: 2018-02-08 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Aaron Paden 2015-03-30 21:33:05 UTC
If I search for "n with tilde", I get 3 results in this order: "Latin Capital Letter N", "Latin Capital Letter A", and "Latin Capital Letter N With Tilde". One of the expected results would obviously be "Latin Small Letter N With Tilde".

I also wonder about the order of the results, and if 3 results is a hard limit. Though I realize spamming the overview with a thousand results is not useful to anyone.
Comment 1 Daiki Ueno 2015-03-31 08:11:09 UTC
Yes, the search logic could be smarter.  The current algorithm is to loop over characters in order of codepoint value and check if each character name contains all words in the keyword string, in a similar way to the application picker.

It might not be easy to manage both performance and accuracy.  One idea is to make the result set only contain "representative" characters, i.e. given the search keyword "latin capital", include "Latin Capital Letter A" but not include subsequent characters like "Latin Capital Letter B".  I guess it could be implemented using edit distance between the last two character names.
Comment 2 Aaron Paden 2015-03-31 18:41:00 UTC
It seems like this is a bug, then. In the given results, two of the three don't contain the words "n with tilde" at all.

I'm not exactly an expert on search, but it seems like for this job matching character names with the search string is probably fine. Maybe you should sort the results by number of matches before displaying them as well, but I don't see why a more complicated solution would be necessary.
Comment 3 Daiki Ueno 2015-04-01 01:41:14 UTC
(In reply to Aaron Paden from comment #2)
> It seems like this is a bug, then. In the given results, two of the three
> don't contain the words "n with tilde" at all.

Ah, right.  Sorry for misreading that.  The fix is in:
https://git.gnome.org/browse/gnome-characters/commit/?id=f4e54346
though I can't reproduce the second result ("Latin Capital Letter A").

> I'm not exactly an expert on search, but it seems like for this job matching
> character names with the search string is probably fine. Maybe you should
> sort the results by number of matches before displaying them as well, but I
> don't see why a more complicated solution would be necessary.

Good idea, thanks for the suggestion.
Comment 4 Aaron Paden 2015-04-02 00:00:22 UTC
(In reply to Daiki Ueno from comment #3)
> (In reply to Aaron Paden from comment #2)
> > It seems like this is a bug, then. In the given results, two of the three
> > don't contain the words "n with tilde" at all.
> 
> Ah, right.  Sorry for misreading that.  The fix is in:
> https://git.gnome.org/browse/gnome-characters/commit/?id=f4e54346

After installing the git version, all of the results **do** end in "with tilde", but they don't match "n". The result is that only the second result is relevant: "Latin Capital Letter N With Tilde". The small version still doesn't show up.

> though I can't reproduce the second result ("Latin Capital Letter A").

Probably a mistake on my end, now that you mention it. I may have meant "Latin Capital Letter A With Tilde".
Comment 5 Hashem Nasarat 2016-01-31 00:49:49 UTC
If you search for "thumb" you don't 
Comment 6 Hashem Nasarat 2016-01-31 00:57:48 UTC
... see 
Comment 7 Hashem Nasarat 2016-01-31 00:58:41 UTC
(haha wow bugzilla won't let me type Ctrl+Shift+u 1f44d (the thumbs up sign))
... the thumbs up sign but once you type the final 's' in "thumbs" then you see it.
Comment 8 Daiki Ueno 2016-01-31 02:47:55 UTC
Hashem, which version are you using?  If it is 3.19.2 or earlier, it might be bug 757523.
Comment 9 Hashem Nasarat 2016-01-31 03:18:19 UTC
Daiki Ueno, oops i was using 3.18. The version from jhbuild doesn't have the issue I described. Thanks for the explanation.
Comment 10 Aaron Paden 2016-04-06 03:45:45 UTC
I'm seeing a regression in search on 3.20. 

A case I use often: on 3.18, if I search for "em dash", gnome-characters returns an em dash as the first result, as you might expect. I was able to just type in "em dash" and hit enter, and it was in my clipboard. Very useful.

On 3.20, searching for "em dash" yields no results. Searching for "em" does return an em dash, but of course it also matches a lot of other things.
Comment 11 Aaron Paden 2016-04-06 03:47:55 UTC
Looks like search fails on all multiple word searches, actually.
Comment 12 Daiki Ueno 2016-04-06 06:01:11 UTC
I suppose you mean using it as a gnome-shell search provider.  Yes, it is a regression after:
https://git.gnome.org/browse/gnome-characters/commit/?id=1f1346d17673fa153bc62fe3dd72160940f0a65c

I have pushed a fix:
https://git.gnome.org/browse/gnome-characters/commit/?id=507d549931126f7ab25b9808cff668bda41b6965
(will backport it for 3.20)
Comment 13 Aaron Paden 2016-04-16 02:01:59 UTC
Ok, all of the typically issues that I run into personally have been fixed by 3.20.1

However, I've found that some single-letter keywords are still not matched, while others are.

For example, if I search 'letter m', I get the following results:

Latin Capital Letter M
Latin Small Letter M
Latin Capital Letter A With Macron

However, if I search for 'letter l', I get:

Latin Capital Letter A
Latin Capital Letter B
Latin Capital Letter C

I guess it looks like perhaps single-letter keywords are simply matching the first letter of full words, and m is more rare than l. I can see how this might be considered a feature; you get results up more quickly. However, single-letter matches are common for characters for obvious reasons, so you might want them to be prioritized. I guess that's a value judgement.
Comment 14 GNOME Infrastructure Team 2018-02-08 13:15:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-characters/issues/6.