Skip to content

Conversation

@edwood-grant
Copy link
Contributor

@edwood-grant edwood-grant commented Aug 11, 2025

Short summary

This change looks to improve results when searching packages on the search bar.
Aims to improve search results, fixes #2232, fixes #1556.

This modification does two things:

  1. Compare search queries directly with the component name or the component id. If there is either an exact match or partial match (a sub-string). It will improve its score significantly to help it bump it up to the top.
  2. If there are multiple tokens, add an extra token that consist of all joined tokens, which aims to compare directly to name or id. (for example "libre office" would have the tokens "libre, "office" and will add third extra token being "libreoffice".

Tests

Recreated search queries with three apps: CherryTree, Gnu Cash, and Libre Office:

  1. Searching for "Libre Office" in various forms should give you more varied results given the new scores. Searching for "Libre" should show Libre Office in the list.
  2. Searching for "Gnu Cash" and "Cash" will now show the Gnu Cash app and other that match the substring (as opposed of not showing anything or not showing the app itself among others)
  3. Searching for "tree" will eventually show the CherryTree app below properly (as opposed of not showing it).

I think this change should bring overall better search result especially when searching for name directly for some apps.

@edwood-grant edwood-grant requested a review from jeremypw August 11, 2025 20:53
@edwood-grant edwood-grant changed the title Improve search results by checking againts package id and name (#2232 - #1556) Improve search results by checking against package id and name (#2232 - #1556) Aug 11, 2025
@edwood-grant edwood-grant changed the title Improve search results by checking against package id and name (#2232 - #1556) Improve search results by checking query against package id and name (#2232 - #1556) Aug 11, 2025
edwood-grant and others added 5 commits September 18, 2025 19:02
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
Co-authored-by: Leo <lenemter@gmail.com>
@lenemter
Copy link
Member

Hm.... Searching for "Cherry" still doesn't show CherryTree app for me:

image

@edwood-grant
Copy link
Contributor Author

edwood-grant commented Sep 22, 2025

@lenemter Huh, how odd, just tested it and it shows for me.

image

Maybe I'm doing something wrong wit my setup. I will check to ensure that I'm using the correct installed app.

EDIT: Just checked and ensured its the updated app in the correct branch. I can see the CherryTree app. Not sure what I could do to ensure it shows properly or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search unexpectedly fails for some strings Be less strict about the search term

5 participants