Skip to content

Commit

Permalink
boost graphql types in results (#659)
Browse files Browse the repository at this point in the history
Because "type" in scip-ctags matches so much we can't boost it as high
as we do for classes/structs in our language specific boosting. In the
case of GraphQL this is useful to boost.

Test Plan: A search like "type User" in the sourcegraph codebase now
includes results from the schema.graphql files.
  • Loading branch information
keegancsmith authored Oct 19, 2023
1 parent f39e6eb commit 081cd03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contentprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,11 @@ func scoreKind(language string, kind string) float64 {
case "local":
factor = 3
}
case "GraphQL", "graphql":
switch kind {
case "type":
factor = 10
}
}

return factor * scoreKindMatch
Expand Down

0 comments on commit 081cd03

Please sign in to comment.