thunderstore-io / Thunderstore

Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.thunderstore.io/
https://thunderstore.io/
GNU Affero General Public License v3.0
129 stars 27 forks source link

Change search to match every sub part #1054

Open MSchmoecker opened 3 weeks ago

MSchmoecker commented 3 weeks ago

The search in Thunderstore is currently barely usable for searches with more than one term.

Instead of matching any part of the query in any field, this matches every part in any field. I.e. all parts must be in the name, description or author name, not only one part. Similar how r2modman works.

For example in Valheim, searching 'Epic Loot' returns about 100 packages (4 pages), with the actual package burred in the last page because it is named 'EpicLoot'. Most of the other packages are completely unrelated but either contain 'Epic' or 'Loot' somewhere. With this PR, the result is only about 6 packages related and including EpicLoot (in my dev environment that is populated with Valheim package names).

Overall, this makes the search more strict. However, this is usually the expected behaviour. Adding more terms to the search should narrow down the results, not give more matches.

MSchmoecker commented 2 weeks ago

@MythicManiac any thoughts about this?