ndmitchell / ndmitchell/hoogle

The OpenSearch description specifies a broken suggestions endpoint

Open
#389 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Haskell
Stars
803
Forks
152
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with html/search.xml and the referenced mode handling in src/Action/Server.hs. Compare the declared OpenSearch suggestion URL with the available server modes and reproduce the endpoint behavior. Done means the documented suggestions endpoint is implemented and the description does not point to a broken mode; the server-URL issue is noted separately in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.