Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve docs search ranking for API queries#701

Merged
cvanelteren merged 1 commit into
mainUltraplot/UltraPlot:mainfrom
docs/prioritize-api-searchUltraplot/UltraPlot:docs/prioritize-api-searchCopy head branch name to clipboard
Apr 23, 2026
Merged

Improve docs search ranking for API queries#701
cvanelteren merged 1 commit into
mainUltraplot/UltraPlot:mainfrom
docs/prioritize-api-searchUltraplot/UltraPlot:docs/prioritize-api-searchCopy head branch name to clipboard

Conversation

@cvanelteren

Copy link
Copy Markdown
Collaborator

Summary:

  • Treat generic query words like function, method, API, and reference as search intent instead of object-name filters.
  • Boost API object references and API pages for API-shaped docs searches so queries like format function surface format() reference anchors first.
  • Add a JS-backed pytest for the search hook behavior.

Checks:

  • black ultraplot/tests/test_docs_search.py
  • node --check docs/_static/custom.js
  • pytest ultraplot/tests/test_docs_search.py -q
  • pytest -n 4 ultraplot/tests/test_docs_search.py ultraplot/tests/test_docs_fetch_releases.py -q
  • Simulated the built Sphinx index for format function and confirmed API object anchors are the top displayed results.

…ad of guide pages for API-shaped queries such as format function, while keeping guide results available lower in the list.
@cvanelteren cvanelteren merged commit f140c93 into main Apr 23, 2026
16 of 17 checks passed
@cvanelteren cvanelteren deleted the docs/prioritize-api-search branch April 23, 2026 02:51
@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/tests/test_docs_search.py 87.50% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.