Skip to content

Commit

Permalink
score: remove ZOEKT_NOVELTY_DISABLE (#718)
Browse files Browse the repository at this point in the history
This has been running for three months and we haven't found a need to
disable it.

Test Plan: go test ./...
  • Loading branch information
keegancsmith authored Jan 17, 2024
1 parent 7dcc797 commit 1adab43
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions contentprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"bytes"
"fmt"
"log"
"os"
"path"
"sort"
"strings"
Expand Down Expand Up @@ -1003,8 +1002,6 @@ func sortChunkMatchesByScore(ms []ChunkMatch) {
sort.Sort(chunkMatchScoreSlice(ms))
}

var doNovelty = os.Getenv("ZOEKT_NOVELTY_DISABLE") == ""

// SortFiles sorts files matches in the order we want to present results to
// users. The order depends on the match score, which includes both
// query-dependent signals like word overlap, and file-only signals like the
Expand All @@ -1015,10 +1012,8 @@ var doNovelty = os.Getenv("ZOEKT_NOVELTY_DISABLE") == ""
func SortFiles(ms []FileMatch) {
sort.Sort(fileMatchesByScore(ms))

if doNovelty {
// Experimentally boost something into the third filematch
boostNovelExtension(ms, 2, 0.9)
}
// Boost a file extension not in the top 3 to the third filematch.
boostNovelExtension(ms, 2, 0.9)
}

func boostNovelExtension(ms []FileMatch, boostOffset int, minScoreRatio float64) {
Expand Down

0 comments on commit 1adab43

Please sign in to comment.