Re: [PATCH] docs: add advanced search for kernel documentation
From: Randy Dunlap
Date: Sat Mar 21 2026 - 18:54:34 EST
Hi,
On 3/21/26 11:15 AM, Rito Rhymes wrote:
> Replace the stock Sphinx search page with one that reuses the
> existing searchindex.js while adding structured result grouping,
> filtering, and exact identifier matching.
>
> Results are grouped into Symbols, Sections, Index entries, and
> Pages, each in a collapsible section with a count. An Advanced
> panel exposes filters for documentation area, object type, result
> kind, and exact match mode. All state is URL-encoded so searches
> remain shareable.
Apparently I need more help/instructions. When I click on Advanced Search
and get that web page, I enter "futex" into the Search Query and click
on [Search]. I am leaving all Advanced Search options at their default
settings.
I get no output. Is this expected?
What am I doing wrong?
thanks.
> Page summary snippets are lazy-loaded via IntersectionObserver to
> avoid fetching every matching page up front.
>
> The sidebar keeps the existing quick-search box and adds an
> "Advanced search" link below it.
>
> Signed-off-by: Rito Rhymes <rito@xxxxxxxxxxxxxx>
> ---
> Documentation/sphinx-static/custom.css | 163 ++++
> Documentation/sphinx-static/kernel-search.js | 746 ++++++++++++++++++
> Documentation/sphinx/templates/search.html | 106 +++
> Documentation/sphinx/templates/searchbox.html | 18 +
> 4 files changed, 1033 insertions(+)
> create mode 100644 Documentation/sphinx-static/kernel-search.js
> create mode 100644 Documentation/sphinx/templates/search.html
> create mode 100644 Documentation/sphinx/templates/searchbox.html
--
~Randy