alphagov/rummager — pull request #107 by jamiecobbett (2013-06-06 12:55:16+00:00)
Title: Spelling suggestions

Expose spelling suggestions for the search term.

The suggestions are only exposed if ``response_style=hash`` is added to the request URL like this: ``/search.json?q=blah&response_style=hash``.

Suggestions (currently just one) are generated by taking each word in the term and passing it through aspell's suggest feature (http://aspell.net).

Suggestions won't be that graceful when it comes to words which are in the GOV.UK corpus, but which are not in Aspell's en_GB dictionary. I intend to investigate and resolve that later.

This shouldn't be merged (or deployed until the related Puppet pull request has been merged, or Rummager won't be deployable (aspell needs to be installed):
https://github.gds/gds/puppet/pull/661