newfs/gobotany-app — pull request #540 by davisagli (2013-08-23 23:32:12+00:00)
Title: Add index to support spelling suggestions

The heroku websolr add-on supports providing spelling suggestions ("did you mean x?") with search results if there's an index named textSpell. This adds and populates that index.

See http://blog.websolr.com/post/2748574298/spellcheck-with-solr-spellcheckcomponent for more info about this. I actually had to contact websolr support and have them adjust solrconfig.xml so that the suggestion component would be enabled.

Once suggestions are being returned by solr, including them in search results is as simple as setting HAYSTACK_INCLUDE_SPELLING = True and doing something like this in the search template:

````
{% if suggestion %}

Did you mean {{suggestion}}?

{% endif %}
````