{"action":"created","issue":{"url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/123","repository_url":"https://api.github.com/repos/flathub/linux-store-frontend","labels_url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/123/comments","events_url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/123/events","html_url":"https://github.com/flathub/linux-store-frontend/issues/123","id":341911045,"node_id":"MDU6SXNzdWUzNDE5MTEwNDU=","number":123,"title":"support keywords for search","user":{"login":"matthiasclasen","id":4834845,"node_id":"MDQ6VXNlcjQ4MzQ4NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4834845?v=4","gravatar_id":"","url":"https://api.github.com/users/matthiasclasen","html_url":"https://github.com/matthiasclasen","followers_url":"https://api.github.com/users/matthiasclasen/followers","following_url":"https://api.github.com/users/matthiasclasen/following{/other_user}","gists_url":"https://api.github.com/users/matthiasclasen/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasclasen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasclasen/subscriptions","organizations_url":"https://api.github.com/users/matthiasclasen/orgs","repos_url":"https://api.github.com/users/matthiasclasen/repos","events_url":"https://api.github.com/users/matthiasclasen/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasclasen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-17T13:05:59Z","updated_at":"2018-08-08T10:31:00Z","closed_at":null,"author_association":"NONE","body":"I've noticed a few unexpected search results, e.g. anydesk not showing up in a search for \"remote\" despite the description containing that term. An easy way to fix up such cases would be keywords "},"comment":{"url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/comments/411361312","html_url":"https://github.com/flathub/linux-store-frontend/issues/123#issuecomment-411361312","issue_url":"https://api.github.com/repos/flathub/linux-store-frontend/issues/123","id":411361312,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTM2MTMxMg==","user":{"login":"wjt","id":86760,"node_id":"MDQ6VXNlcjg2NzYw","avatar_url":"https://avatars2.githubusercontent.com/u/86760?v=4","gravatar_id":"","url":"https://api.github.com/users/wjt","html_url":"https://github.com/wjt","followers_url":"https://api.github.com/users/wjt/followers","following_url":"https://api.github.com/users/wjt/following{/other_user}","gists_url":"https://api.github.com/users/wjt/gists{/gist_id}","starred_url":"https://api.github.com/users/wjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjt/subscriptions","organizations_url":"https://api.github.com/users/wjt/orgs","repos_url":"https://api.github.com/users/wjt/repos","events_url":"https://api.github.com/users/wjt/events{/privacy}","received_events_url":"https://api.github.com/users/wjt/received_events","type":"User","site_admin":false},"created_at":"2018-08-08T10:31:00Z","updated_at":"2018-08-08T10:31:00Z","author_association":"NONE","body":"I had a quick look to see how easy it'd be to use the keywords from appstream and the answer was “not as easy as I'd hoped”.\r\n\r\nFirst, the i18n bit. The AppdataComponent object for each app points to a Component which holds [one](https://github.com/jgarciao/appstream-appdata-java/blob/master/src/main/java/org/freedesktop/appstream/appdata/Component.java#L100-L101) [Keywords object](https://github.com/jgarciao/appstream-appdata-java/blob/master/src/main/java/org/freedesktop/appstream/appdata/Keywords.java) which I think corresponds to the first `<keywords>` element found. Checking the [appstream spec](https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html#tag-ct-keywords), there can actually be more than one `<keywords>` element with different `lang=`.\r\n\r\nAnyway this is theoretical because every app on Flathub has a single unlocalized `<keywords>`.\r\n\r\nRight now search on the site is implemented by [fetching the JSON description of every app and iterating it](https://github.com/flathub/linux-store-frontend/blob/3017b4d7e2ddde9136e785566e3f1eac330a4947/src/app/linux-store-api.service.ts#L103-L115). The function has \"keywords\" in its name but the AppStream keywords are not provided in the JSON description or indeed stored in the database. So basically one needs to duplicate all the handling of categories (new database table, many-to-many join, and mapping from that to JSON list of strings), and then make the frontend search that string.\r\n\r\n(Better would be to do search on the server-side and build an index. One could consider also matching on app descriptions, but considering those to be lower-quality hits.)"}}
{"actor":{"display_login":"wjt"}}