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

Improve path matching ranking #26

Closed
natecraddock opened this issue Mar 6, 2023 · 4 comments
Closed

Improve path matching ranking #26

natecraddock opened this issue Mar 6, 2023 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@natecraddock
Copy link
Owner

Something I noticed

> mod/baz.rb
./app/models/foo-bar-baz.rb
./app/models/foo/bar-baz.rb
./app/models/foo/bar/baz.rb

In this case I think we should expect mod/baz.rb to rank ./app/models/foo/bar/baz.rb the hightest because baz.rb has the greatest path segment coverage on that string.

@natecraddock natecraddock added the enhancement New feature or request label Mar 6, 2023
@natecraddock natecraddock added this to the 0.8.0 milestone Mar 8, 2023
@Pistos
Copy link

Pistos commented Mar 9, 2023

This is a good improvement, but when I try with version 734af10 , given:

app/models/abilities/attributes/customers.rb
app/models/user.rb

when I search for ap/mod/user.rb, the customers.rb is ranked higher. Perhaps this is because the a of abilities sorts alphabetically before the u of user.rb at the same level (siblings under app/models/)

@natecraddock
Copy link
Owner Author

@Pistos I'm not seeing this on my end

image

@Pistos
Copy link

Pistos commented Mar 10, 2023

My bad. It was my editor doing the sorting. Sorry for the noise. 😅

@natecraddock
Copy link
Owner Author

No worries! Thanks for actively reporting things :)

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

No branches or pull requests

2 participants