From 081cd037fd808a6b06cf7f90e46e19ba86099eb5 Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Thu, 19 Oct 2023 08:39:29 +0200 Subject: [PATCH] boost graphql types in results (#659) 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. --- contentprovider.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contentprovider.go b/contentprovider.go index 42abf5eae..0615a32a3 100644 --- a/contentprovider.go +++ b/contentprovider.go @@ -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