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

scoring: score methods and funcs the same #666

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

stefanhengl
Copy link
Member

I don't remember if there was a good reason to score methods and functions differently, but I have found examples where the difference between the two scores causes the better result to be lower ranked, although it has a higher doc-order boost.

Here is one example

r:golang/go bits Len
Screenshot 2023-10-19 at 17 59 20

Note: Scip-ctags distinguishes between methods and functions, universal-ctags does not.

Test plan:
updated score tests

I don't remember if there was a good reason to score methods and
functions differently, but I have found examples where the difference
between the two scores causes the better result to be lower ranked,
although it has better file-order boost.

Scip-ctags distinguishes between methods and functions, universal-ctags
does not.

Test plan:
updated score tests
@stefanhengl stefanhengl requested a review from a team October 19, 2023 16:01
Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do this. But as a counterpoint I think functions generally should be higher ranked. I think what is going wrong here in your example query is we don't properly boost filename matches with exact matches in the file.

@stefanhengl
Copy link
Member Author

I think what is going wrong here in your example query is we don't properly boost filename matches with exact matches in the file.

I will look into this today. I guess we don't boost exact over partial matches in filenames.

@stefanhengl stefanhengl merged commit c869a24 into main Oct 20, 2023
8 checks passed
@stefanhengl stefanhengl deleted the sh/score-methods-and-functions-the-same branch October 20, 2023 07:37
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

Successfully merging this pull request may close these issues.

2 participants