Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fuse rating for FileSuggest #272

Closed
revolvermann76 opened this issue Jun 10, 2024 · 2 comments · Fixed by #273 · May be fixed by #303
Closed

[BUG] Fuse rating for FileSuggest #272

revolvermann76 opened this issue Jun 10, 2024 · 2 comments · Fixed by #273 · May be fixed by #303
Assignees
Labels
bug Something isn't working

Comments

@revolvermann76
Copy link
Contributor

In suggestFile.ts you use a Fuse rating of

            keys: [
                { name: "path", weight: 2 },
                { name: "tags", weight: 1 },
                { name: "frontmatter.aliases", weight: 2 },
            ],

That makes the path-name success over the actual file-name.

It is not easy for the user, to pick a file "place.md" if there exists alot of files within a path like "a/place/somewhere/".

A better Fuse rating would be

      keys: [
        { name: "name", weight: 3 },
        { name: "frontmatter.aliases", weight: 2 },
        { name: "path", weight: 2 },
        { name: "tags", weight: 1 }
      ],

A simple change. But it makes life much more easy for the user in some cases ;)

@revolvermann76 revolvermann76 added the bug Something isn't working label Jun 10, 2024
@danielo515
Copy link
Owner

I completely agree. Was wondering why was so hard for me to find the right files. Willing to open a pull request?
What do you think about giving path and tags the same weight? Aliases seems more important to me

@revolvermann76
Copy link
Contributor Author

I created a pull request. I gave path and tags the same weight (as you suggested).

Have a nice day

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