Oh hmm, interesting point. Although algolia doesn't know a URL from a title.. so auto-escaping could be risky (if you check with the tilde instead you see it was already duped[0]). Searching for Knuth[1] or the stanford site list[2] brings it up.
My design impulse would be that if a search turns up no hits and it is a valid URI and contains escapes, then try a resource-limited number of unescaped versions (and more broadly, consider some edit-distances of it if possible). I do a lot of little tricks like that on Gwern.net's 404 page and reference-lookup pages ( https://gwern.net/404 and https://gwern.net/ref/ ), and it all seems to help.
[0]: https://news.ycombinator.com/item?id=50680168
[1]: https://hn.algolia.com/?dateRange=last24h&query=Knuth&sort=b...
[2]: https://news.ycombinator.com/from?site=stanford.edu