hoogle icon indicating copy to clipboard operation
hoogle copied to clipboard

The OpenSearch description specifies a broken suggestions endpoint

Open lf- opened this issue 3 years ago • 0 comments

Hoogle seems to support OpenSearch discovery, for integrating as a browser search engine. The docs for that are here: https://developer.mozilla.org/en-US/docs/Web/OpenSearch#autodiscovery_of_search_plugins

However, in Hoogle's description file here: https://github.com/ndmitchell/hoogle/blob/master/html/search.xml it's specified that Hoogle should be invoked with mode=suggest via this URL: https://hoogle.haskell.org/?hoogle={searchTerms}&mode=suggest

(an independent bug is that this doesn't vary based on the server URL so this doesn't correctly work on localhost hoogle)

However, this mode doesn't exist in the source code:

https://github.com/ndmitchell/hoogle/blob/62a2a8a5827183b1846d31dc9cd61b3fd05ff19e/src/Action/Server.hs#L102-L123

Thus, suggestions don't work. I might go add that mode, since it is likely not that tricky.

lf- avatar Oct 02 '22 19:10 lf-