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

Configure Feed

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

score: remove repetition-boost (#667)

The definition of how this is applied is very narrow and more often than
not works poorly. Originally I sent out a commit to dampen this using
log, but Julie suggested just removing which sounds better.

Test Plan: go test

-8
-1
contentprovider.go
··· 461 461 scoreSymbol = 7000.0 462 462 scorePartialSymbol = 4000.0 463 463 scoreKindMatch = 100.0 464 - scoreRepetitionFactor = 1.0 465 464 scoreFactorAtomMatch = 400.0 466 465 467 466 // File-only scoring signals. For now these are also bounded ~9000 to give them
-7
eval.go
··· 415 415 } 416 416 417 417 maxFileScore := 0.0 418 - repetitions := 0 419 418 for i := range fileMatch.LineMatches { 420 419 if maxFileScore < fileMatch.LineMatches[i].Score { 421 420 maxFileScore = fileMatch.LineMatches[i].Score 422 - repetitions = 0 423 - } else if maxFileScore == fileMatch.LineMatches[i].Score { 424 - repetitions += 1 425 421 } 426 422 427 423 // Order by ordering in file. ··· 441 437 // strictly dominates the in-file ordering of 442 438 // the matches. 443 439 fileMatch.addScore("fragment", maxFileScore, opts.DebugScore) 444 - 445 - // Prefer docs with several top-scored matches. 446 - fileMatch.addScore("repetition-boost", scoreRepetitionFactor*float64(repetitions), opts.DebugScore) 447 440 448 441 if opts.UseDocumentRanks && len(d.ranks) > int(doc) { 449 442 weight := scoreFileRankFactor