-
Notifications
You must be signed in to change notification settings - Fork 21
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
Query with slashes. #6
Comments
After some test, Basically there is a importance boost for matching file-name, and when query contain slashes, I promote the end of path as if it where the file name. (A query with It often serves us well but here it doesn't. Two things I can see:
|
Changed the title of the issue because this looks like it would require quite a bit of change, and I'd like to see if there's other issue related to slashes. One thing I consider is removing the end-of-path bonus that come with
|
I think a way to maybe fix this is not promote the idea of It's just an idea, though, if the current behaviour works best in most scenarios, we could just leave it as it is. |
Yea I tried to remove it, some test are failing, but they are design test, instead of user report tests.
|
That test probably should be passing, did you completely remove the path separator check? Maybe if given an input with The slash and what was before and after it is important, maybe not the number of shashes. |
The code in question is here Basically there is two scoring being done.
So when the query is
By default the end-of-path scoring is resilient to error. It cannot find the first part of the query So when the query is
You see that it's doing it's job in a logical way. Matching is improved and we don't have to rely on the resilient mechanism for the end-of-path to works. If you don't know the correct number of folder. Say path is So when the query is
Now we cannot find So basically going back n folder + resiliency when not finding part of query match you at-least-n expectation. Part of the story is that people expect |
I'll close this issue. Mostly because it require a lot of change and the problem is one character away from solving itself. If anyone see problem with slash in query in a more realist scenario i'll reopen |
As instructed in atom/fuzzaldrin#27, opened this issue where it's more relevant:
I understand the scoring algorithm uses some sort of penalty to a file if it was too deep inside the directory structure, but sometimes this doesn't make sense, I'll post an example and explain:
As you can see, it now matches the probably expected file, but when we want to filter by saying "it's in the
controllers/
directory"It penalizes the
application_controller
result because directory depth, or at least that's my guess. So why not start the deepness count of at the first directory match, in this case in thecontrollers/
directory.The text was updated successfully, but these errors were encountered: