Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,8 @@
'<meta property="og:image:width" content="200">',
'<meta property="og:image:height" content="200">',
)

# Options to adjust search results sorting
# ----------------------------------------

html_search_scorer = "search_scorer.js"
24 changes: 24 additions & 0 deletions Doc/search_scorer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var Scorer = {
score: function (result) {
let [docname, title, anchor, descr, score, filename] = result;
if (docname == "library/stdtypes" || docname == "library/functions") {
score += 10;
}
return score;
},

objPrio: {
0: 15,
1: 5,
2: -5,
},
objPrioDefault: 0,

objNameMatch: 20,
objPartialMatch: 6,

title: 15,
partialTitle: 7,
term: 5,
partialTerm: 2,
};
Loading