If only a partial matching of a word is found in an app, this app is listed high, e.g. searching "map" would give you "/system/app mover" in the first place which is non-relevant at all (Note "/systeM/APp" matches "map" partially). I would propose to rank this app lower in this search.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
I came here to suggest sorting the search results by relevance. Is that what this issue is referring to or should I open a new new one for that? The title of this one seems to imply that some form of ranking already takes place and simply needs improving.
Improved searching is definitely needed, the hard part is determining "relevance". Google does it by tracking everything you do in detail, and then selling that info to people to purchase relevance (aka ads). F-Droid actively avoids all kinds of tracking of its users, so those kinds of models don't work.
You may be overestimating the scale of the problem. We're not trying to rank millions of apps with identical names according to personal preferences here. Simply determining a score based on some common sense criteria would go a long way.
For example, consider the following list of apps:
Dictionary: For looking up words
Introspection: An app that gets you thinking
Planetarium: Astronomy tool with many special features
Spec: Tower Defense Game
The search term "Spec" would lead to the following ranking:
Spec [highest score, match on title]
Introspection [medium score, substring match in title]
Planetarium [low score, substring match in description]
I believe the FTS (full text search) engine in SQLite3 helps us with this, by providing relevance numbers for each result. Not sure if you can weight the relevance by which field matches, but it is still better than nothing. I'm not sure on the algorithm they use, but there are plenty of algorithms which work without collecting user data. One of the most famous is TF/IDF (term frequency / inverse document frequency). The intuition for that is: "As a term from the query appears with a high frequency in, e.g., a description, rank higher. However, if that term appears in many different documents (e.g. "the"), then weight it lower.
The other improvement you get from the FTS engine is word stemming. So if I search for "runner", then it will stem the word to its base (unfortunately English) word "run" and then match other stemmed words that match, such as "running". Not sure how this goes for other languages though.
I use FTS3 for full-text search of the APK edition of my book. It's astonishing how fast it is. However, do note that it will consume a chunk of disk space. For example, for 11.5MB of book prose HTML, the FTS3 index is 9.6MB.
@commonsguy any experience on FTS3 vs FTS4? Given that we don't want to bump minSdk past android-10, should we use FTS3 on all versions or some combination of FTS4 and FTS3/nothing?
Edit: just noticed his blog post mentions pros and cons, which answers the first question.
@mvdan The docs have a section on the differences. Unless you need certain matchinfo fields that are only available on FTS4, you should be OK with FTS3. Or, do what @eighthave suggested, and go FTS4 with limited searching on Android 2.3.