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

Prefer consecutive matches #173

Open
xeruf opened this issue May 29, 2022 · 1 comment
Open

Prefer consecutive matches #173

xeruf opened this issue May 29, 2022 · 1 comment

Comments

@xeruf
Copy link

xeruf commented May 29, 2022

image

I would have expected "Walls" to match higher here, and especially "Walls Crumble" as it contains the search term twice, which apparently is not a case considered at all so far.

@casr
Copy link
Contributor

casr commented May 30, 2022

Have a look at the high-level algorithm description for the details but I think in your case it favours the consecutive letters of 'all' + the fact that 'a' has a space before it which ranks higher than just consecutive lettering of 'alls' in 'Walls'.

  • Gaps (negative score)

    • at the start of the match
    • at the end of the match
    • within the match
  • Matches (positive score)

    • consecutive
    • following a slash
    • following a space, underscore, or dash (the start of a word)
    • capital letter (the start of a CamelCase word)
    • following a dot (often a file extension)

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

No branches or pull requests

2 participants