gdesktopappinfo: Do not search Comment field

The Comment field provides a user-visible description of the app,
which usually contains generic words ("and", "or", "not", "is", ...)
that add noise when used for search.

It made some sense to match against the field as a fallback for
Keywords, before that key was well established. However that key
has been around for years now, so hopefully every app where additional
terms are helpful uses it by now.

With that, the downside of added noise outweighs the benefit, so
it's time to stop matching on comments.
This commit is contained in:
Florian Müllner
2023-10-03 12:58:40 +02:00
parent 2f1f97d58d
commit 794b18df34
2 changed files with 8 additions and 16 deletions

View File

@@ -432,7 +432,6 @@ add_to_table_if_appropriate (GHashTable *apps,
enum
{
DESKTOP_KEY_Comment,
DESKTOP_KEY_Exec,
DESKTOP_KEY_GenericName,
DESKTOP_KEY_Keywords,
@@ -452,8 +451,7 @@ const gchar desktop_key_match_category[N_DESKTOP_KEYS] = {
[DESKTOP_KEY_Exec] = 2,
[DESKTOP_KEY_Keywords] = 3,
[DESKTOP_KEY_GenericName] = 4,
[DESKTOP_KEY_X_GNOME_FullName] = 5,
[DESKTOP_KEY_Comment] = 6
[DESKTOP_KEY_X_GNOME_FullName] = 5
};
typedef enum {
@@ -487,8 +485,6 @@ desktop_key_get_name (guint key_id)
{
switch (key_id)
{
case DESKTOP_KEY_Comment:
return "Comment";
case DESKTOP_KEY_Exec:
return "Exec";
case DESKTOP_KEY_GenericName: