title: Search term suggestions
body: <p>This question has been asked in various ways before, but I'm wondering if people who have experience with automatic search term suggestion could offer advice on the most useful and efficient approaches. Here's the scenario:</p>
  
  <p>I'm just starting on a website for a book that is a dictionary of terms (roughly 1,000 entries, with  300 word explanations on average), many of which are fairly obscure, and it is likely that many visitors to the site would not know how to spell the words. The publisher wants to make full-text search available for every entry. So, I'm hoping to implement a search engine with spelling correction. The main site will probably be done in a PHP framework (or possibly Django) with a MySQL database.</p>
  
  <p>Can anyone with experience in this area give advice on the following:</p>
  
  <ul>
  <li>With a set corpus of this nature, should I be using something like <a href="http://lucene.apache.org/" rel="nofollow noreferrer">Lucene</a> or <a href="http://www.sphinxsearch.com/" rel="nofollow noreferrer">Sphinx</a> for the search engine?</li>
  <li>As far as I can tell, neither of these has a built-in suggestion function. So it seems I will need to integrate one or more of the following. What are the advantages / disadvantages of:
  <ul>
  <li>Suggestion requests through <a href="http://code.google.com/apis/soapsearch/reference.html#1_3" rel="nofollow noreferrer">Google's search API</a></li>
  <li>A phonetic comparison algorithm like <a href="http://us2.php.net/manual/en/function.metaphone.php" rel="nofollow noreferrer">metaphone()</a> in PHP</li>
  <li>A spell checking system like <a href="http://aspell.net/" rel="nofollow noreferrer">Aspell</a>
  <li>A simpler spelling script such as <a href="http://norvig.com/spell-correct.html" rel="nofollow noreferrer">Peter Norvig's</a></li>
  <li>A Levenshtein function</li>
  </ul>
  </ul>
  
  <p>I'm concerned about the specificity of my corpus, and don't want Google to start suggesting things that have nothing to do with this book. I'm also not sure whether I should try to use both a metaphone comparison and a Levenshtein comparison, or some other combination of techniques to capture both typos and attempts at phonetic spelling.</p>