| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm played with this a bit and I generally like new search output 👍
Sorry, something went wrong.
...to try to keep most search results roughly where they currently are.
|
Thanks for taking a look, @skirpichev! I just pushed a few changes, adding some comments and tweaking the scoring a little bit (to adjust one value that I inadvertently changed from the sphinx defaults that was affecting the ordering more than I intended). Looking around a bit more, though, I am wondering if it might be better to do this with a Sphinx object domain, though, setting the builtin things to be important. But I'm not sure if there's an easy way to do that without hard-coding all of the built-in objects somewhere. @AA-Turner might know better. Then again, some of the other changes I had been thinking of probably do require a score function anyway... |
Sorry, something went wrong.
There was a problem hiding this comment.
The file does not belong in the root Doc dir, please move it to Doc/tools/static.
Sorry, something went wrong.
There was a problem hiding this comment.
Look good for me, modulo Stan's comment.
I am wondering if it might be better to do this with a Sphinx object domain, though, setting the builtin things to be important
Probably, the right way might be a mixture of both.
Sorry, something went wrong.
|
Thanks! I went ahead and moved the file into tools/static and removed that comment. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| let [docname, title, anchor, descr, score, filename] = result; | ||
|
|
||
| // boost the score of built-in functions and types | ||
| const builtinPages = ["library/stdtypes", "library/functions"]; |
There was a problem hiding this comment.
Let's add library/exceptions and library/constants.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for taking a look, and good call! I just added those and pushed.
Sorry, something went wrong.
Documentation build overview165 files changed · + 8 added · ± 157 modified + Added
± Modified |
Sorry, something went wrong.
|
I'm not sure what was causing the CI failure before, but merging from main seems to have fixed it. If you want any other changes here, just let me know! |
Sorry, something went wrong.
|
Not sure why the readthedocs build is failing (it looks like it somehow couldn't find that most recent commit?). Is there a way to force it to try again? |
Sorry, something went wrong.
There was a problem hiding this comment.
I have a little suggestion to avoid elevating non-object results: adqm#2
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This patch adds a custom search scorer for the Python docs, in the hopes of making the search results more useful. For now, this just increases the score of built-in functions and types so that they show up closer to the top of the relevant search results, though it also opens the door to other improvements. I also have a couple of other ideas that might further improve the ordering, but I figured it'd be best to start small.
With this change:
I don't think this needs a news item, but I can add one if y'all think it's necessary.
📚 Documentation preview 📚: https://cpython-previews--138278.org.readthedocs.build/