Shalin Shekhar Mangar wrote:
Hi Geoffrey,
Yes, this is a caveat in the lucene contrib spellchecker which Solr uses.
From the lucene spell checker javadocs:
* <p>As the Lucene similarity that is used to fetch the most relevant
n-grammed terms
* is not the same as the edit distance strategy used to calculate the
best
* matching spell-checked word from the hits that Lucene found, one
usually has
* to retrieve a couple of numSug's in order to get the true best match.
*
* <p>I.e. if numSug == 1, don't count on that suggestion being the best
one.
* Thus, you should set this value to <b>at least</b> 5 for a good
suggestion.
Therefore what you're seeing is by design. Probably we should change the
default number of suggestions when querying lucene spellchecker to 5 and
give back the top result if the user asks for only one suggestion from solr.
great, thanks for all that - I'm still trying to figure out where all
the relevant docs live. you've been really helpful.
--Geoff