Skip to content

improve mod/package search #13985

@Lemente

Description

@Lemente

Problem

Issue 1 : package order (popularity over relevance)

If you search "my mod", it will give you all the mods with "my" OR "mod" in the name or short description, apparently sorted by top packages only.
So adding keywords makes the search less precise and will flood the results with less relevant packages.

To see a specific mod as the first result you have to use the technical mod name, if you are lucky it's "my_mod", or "mymod", but it could also be namespaced, like "lem_mymod", or be totally unrelated with the mod name.

Example with a random package: "Advanced Biome Decoration Modpack" the technical name is "abdecor_modpack".

If you search "advanced biome" the mod will be on page 9 of 15, after all the adv train mods and other biome mods.
If you search "biome" only it will be on page 8 of 9.
And on page 5 of 6 with "advanced".
Searching "Advanced Biome" will return nothing.

It doesn't have any review, which explains why it is so low.
But more keywords, especially ones that fit the title, should probably bring that mod above others.

Issue 2 : long description not searched

The long description, which often contains a more complete list of features and keywords isn't searched.

issue 3 : tags not searched

It would make sense for certain tags, like broad categories like "magic", "animals" and "plants", but also technical tags like "singleplayer" or "survival"

Solutions

I'm assuming there are already algorithm available for this, but here are some ideas

Search keywords in the following strings :

  • package name
  • package technical name
  • tags
  • short description
  • long description
  • reviews?

assign points based on:

  • how many of the searched words are present in the string
  • which strings it is in (finding a keyword in the package name rather than the short desc probably means the result will be more relevant) (only count points for the most important string found)
  • less points for partial words (ex: finding "transport" or "sports" when searching "sport")
  • more points when multiple words are in the right order

Use package popularity only to break ties.

With these rules, the first results should always be packages with the most words in the right order in the title.
Which is probably the exactr package the user is looking for.

Alternatives

no?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions