Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Search orders results confusingly #10

Open
iFreilicht opened this issue Nov 7, 2023 · 1 comment
Open

Search orders results confusingly #10

iFreilicht opened this issue Nov 7, 2023 · 1 comment

Comments

@iFreilicht
Copy link

See this example:

Screenshot 2023-11-07 at 10 39 19

I am searching for "optionals", and there is lib.optionals that matches this search exactly, but it is not the first result or even on the first page.

@hsjobeki
Copy link
Collaborator

hsjobeki commented Nov 7, 2023

I guess we need to optimize the search for typical nix user expectations.

I think "lib.optionals" is seen by the search as one word if you search for "optionals" the levenstein distance to "optional" is much closer than to "lib.optionals". We need to change the default search indexing and introduce word splitting for the tokenizer at the (.) dot and also apply some weights for the last part of the string.

So lib.optionals is tokenized into [lib optionals] with a higher weight on "optionals".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants