fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

Increase filename boost (#785)

When we introduced filename boosting in BM25, we set it to a very conservative
weight. This PR increases the weight from 2.0 -> 5.0, which improves results on
relevant evals.

Relates to SPLF-88

+4 -4
+3 -3
build/scoring_test.go
··· 78 78 content: exampleJava, 79 79 language: "Java", 80 80 // bm25-score:1.69 (sum-tf: 7.00, length-ratio: 2.00) 81 - wantScore: 1.69, 81 + wantScore: 1.82, 82 82 }, { 83 83 // Matches only on content 84 84 fileName: "example.java", ··· 99 99 content: exampleJava, 100 100 language: "Java", 101 101 // bm25-score:1.07 (sum-tf: 2.00, length-ratio: 2.00) 102 - wantScore: 1.07, 102 + wantScore: 1.55, 103 103 }, 104 104 { 105 105 // Matches only on filename, and content is missing ··· 107 107 query: &query.Substring{Pattern: "config.go"}, 108 108 language: "Go", 109 109 // bm25-score:1.91 (sum-tf: 2.00, length-ratio: 0.00) 110 - wantScore: 1.91, 110 + wantScore: 2.08, 111 111 }, 112 112 } 113 113
+1 -1
score.go
··· 132 132 term := string(cand.substrLowered) 133 133 134 134 if cand.fileName { 135 - termFreqs[term] += 2 135 + termFreqs[term] += 5 136 136 } else { 137 137 termFreqs[term]++ 138 138 }