You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users will put NumPy questions in the search box and expect the same answers they do now. Users don't know there's a different site under the cover.
Probably true, but we don't know this. I don't think we can expect adding search to be the same as using StackOverflow.
Is this something we want to add before launch? Because if it is, I'd push to start small, and add as we go. I agree search for both the site & docs would be great, I'm not sure it's doable by the time we want to launch, which I was understanding was very soon.
Low-stress solution: a hyperlink that looks like a search box:
The user has to click on the box to fill it out. Instead of going blank, it takes the user to https://numpy.org/devdocs/search.html, our real search page:
Less annoying than you'd think, when I tried it out.
It's not perfect, but it solves the users' problem and ours.
https://pytorch.org/ has a styled looking glass in the right top corner that's quite nice. With live incremental search. Not for now, just noting cause it's pretty cool.
https://pytorch.org/ has a styled looking glass in the right top corner that's quite nice. With live incremental search. Not for now, just noting cause it's pretty cool.
That is pretty neat! And, this should be quite doable, since Sphinx has a JS library, and StackOverflow has an API.
Agreed that this can wait, but would be fun to build.
Reopening for more discussion. The solution in #915 only searches numpy.org hugo site and not the numpy documentation. Can we either get it to search the entire numpy.org or add a note to the bottom of the search pointing to https://numpy.org/doc/stable/search.html for further searches?
@mattip As you might guess by the age of the issue, we have had multiple discussions over the years on this topic in various settings and context, and considered a few options for a unified search for numpy.org.
Here are my current thoughts:
As for implementing unified search, I’d like to experiment with Pagefind mergeIndex. I quite like how fast Pagefind is on numpy.org and how it presents search results. From a quick look, it seems we’d need to generate a Pagefind index for the stable docs, then make a small override to the Hugo theme to merge the two indexes. This would be a slightly bigger effort and take a little more time.
Activity
rgommers commentedon May 23, 2020
Good point, we don't have one but do need one. So much to think about when building a nice website ....
There's some options to implement one at https://gohugo.io/tools/search/
bjnath commentedon May 23, 2020
But Hugo search isn't adequate.
Users will put NumPy questions in the search box and expect the same answers they do now. Users don't know there's a different site under the cover.
Search results must come from Hugo and Sphinx, and if either of them is expendable it's Hugo.
joelachance commentedon May 23, 2020
Sure it is! It searches the site.
Probably true, but we don't know this. I don't think we can expect adding search to be the same as using StackOverflow.
Is this something we want to add before launch? Because if it is, I'd push to start small, and add as we go. I agree search for both the site & docs would be great, I'm not sure it's doable by the time we want to launch, which I was understanding was very soon.
bjnath commentedon May 23, 2020
There are two sites, with HTML in different places.
joelachance commentedon May 23, 2020
@bjnath Yep, of course. But it will be a good amount of work to search both sites. Starting small is in our best interest.
bjnath commentedon May 23, 2020
"Starting small" would mean passing through Sphinx search and ignoring Hugo for now.
We can't give users a search box that's broken for the kinds of queries people expect the site to answer.
joelachance commentedon May 23, 2020
@bjnath I think that would be great, I'd welcome a PR if you want to tackle it!
bjnath commentedon May 23, 2020
@joelachance Cool -- let me take a look.
bjnath commentedon May 23, 2020
Low-stress solution: a hyperlink that looks like a search box:
The user has to click on the box to fill it out. Instead of going blank, it takes the user to
https://numpy.org/devdocs/search.html, our real search page:Less annoying than you'd think, when I tried it out.
It's not perfect, but it solves the users' problem and ours.
Gist: https://gist.github.com/bjnath/d1830c3434413ecfeaca3bc36fb99d3d
rgommers commentedon May 23, 2020
That'd be a good stopgap solution (with some styling). Where would we put it - right side of the navbar?
rgommers commentedon May 23, 2020
https://pytorch.org/ has a styled looking glass in the right top corner that's quite nice. With live incremental search. Not for now, just noting cause it's pretty cool.
bjnath commentedon May 23, 2020
That's what I'd envisioned. I'm open to any place you'd expect a search bar to be.
Yes, please! That was strictly proof of concept.
stefanv commentedon May 23, 2020
That is pretty neat! And, this should be quite doable, since Sphinx has a JS library, and StackOverflow has an API.
Agreed that this can wait, but would be fun to build.
bjnath commentedon May 23, 2020
I assume everyone has already clicked and found how painlessly they're doing it?
https://docsearch.algolia.com/
rgommers commentedon May 23, 2020
I hadn't - looks pretty cool!
joelachance commentedon May 23, 2020
@bjnath, nice find!
InessaPawson commentedon Jan 12, 2026
To follow up on this old but still relevant issue: scientific-python-hugo-theme now includes built-in support for site search: https://github.com/scientific-python/scientific-python-hugo-theme/blob/main/assets/theme-css/search.css
To make this feature visible and usable, we need to wire this up at the numpy.org level by adding a search box. I will try to take a stab at this.
mattip commentedon Oct 9, 2026
Reopening for more discussion. The solution in #915 only searches numpy.org hugo site and not the numpy documentation. Can we either get it to search the entire numpy.org or add a note to the bottom of the search pointing to https://numpy.org/doc/stable/search.html for further searches?
InessaPawson commentedon Oct 10, 2026
@mattip As you might guess by the age of the issue, we have had multiple discussions over the years on this topic in various settings and context, and considered a few options for a unified search for numpy.org.
Here are my current thoughts:
A quick fix would be to add a link to the numpy.org search dialog pointing to https://numpy.org/doc/stable/search.html.
As for implementing unified search, I’d like to experiment with Pagefind
mergeIndex. I quite like how fast Pagefind is on numpy.org and how it presents search results. From a quick look, it seems we’d need to generate a Pagefind index for the stable docs, then make a small override to the Hugo theme to merge the two indexes. This would be a slightly bigger effort and take a little more time.