diff options
author | Richard Hughes <richard@hughsie.com> | 2016-11-03 18:43:40 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-11-03 19:23:41 +0000 |
commit | efd9b9da96653d48d5a6fe82d7f0fe84b15cfb28 (patch) | |
tree | 7323112ec7fe33d88b878753335e1128da7efe25 /client | |
parent | 9c488cd3b4d043a1c8cad5a8760ab724cdec2e84 (diff) | |
download | appstream-glib-efd9b9da96653d48d5a6fe82d7f0fe84b15cfb28.tar.gz |
Allow the client to control what search fields are indexed
This can be used to improve load speed in GNOME Software. By default everything
is indexed, which includes the multi-paragraph long description. Omitting this
information makes a huge difference to the creation time of the search token
cache.
Diffstat (limited to 'client')
-rw-r--r-- | client/as-util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c index 991ae64..7b7106b 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -1303,6 +1303,13 @@ as_util_search (AsUtilPrivate *priv, gchar **values, GError **error) return FALSE; /* prime the search cache */ + as_store_set_search_match (store, + AS_APP_SEARCH_MATCH_MIMETYPE | + AS_APP_SEARCH_MATCH_PKGNAME | + AS_APP_SEARCH_MATCH_COMMENT | + AS_APP_SEARCH_MATCH_NAME | + AS_APP_SEARCH_MATCH_KEYWORD | + AS_APP_SEARCH_MATCH_ID); as_store_load_search_cache (store); /* add matches to an array */ |