| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| var Scorer = { | ||
| score: function (result) { | ||
| let [docname, title, anchor, descr, score, filename] = result; | ||
|
|
||
| // boost the score of built-in functions and types | ||
| const builtinPages = [ | ||
|
Comment thread
StanFromIreland marked this conversation as resolved.
|
||
| "builtins/constants", | ||
| "builtins/exceptions", | ||
| "builtins/functions", | ||
| "builtins/stdtypes", | ||
| ]; | ||
| if (builtinPages.includes(docname)) { | ||
| score += 7; | ||
|
Comment thread
StanFromIreland marked this conversation as resolved.
|
||
| } | ||
|
|
||
| return score; | ||
| }, | ||
|
|
||
|
Comment thread
StanFromIreland marked this conversation as resolved.
|
||
| // all values below this line are the Sphinx defaults | ||
| // (see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_search_scorer) | ||
|
|
||
| // Additive scores depending on the priority of the object | ||
| // Priority is set by object domains | ||
| // (see https://www.sphinx-doc.org/en/master/extdev/domainapi.html) | ||
| objPrio: { | ||
| 0: 15, | ||
| 1: 5, | ||
| 2: -5, | ||
| }, | ||
| objPrioDefault: 0, | ||
|
|
||
| objNameMatch: 11, // score if object's name exactly matches search query | ||
| objPartialMatch: 6, // score if object's name contains search query | ||
|
|
||
| title: 15, // score if title exactly matches search query | ||
| partialTitle: 7, // score if title contains search query | ||
|
|
||
| term: 5, // score if a term exactly matches search query | ||
| partialTerm: 2, // score if a term contains search query | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Rearranged documentation search results to emphasize built-in types and | ||
| functions. Patch by Adam Hartz. |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.