I see at least two request parameters you are passing to the Spellchecker
that may cause this :

<str name="spellcheck.onlyMorePopular">true</str>
*The spellcheck.onlyMorePopular Parameter
If true, Solr will to return suggestions that result in more hits for the
query than the existing query. Note that this will return more popular
suggestions even when the given query term is present in the index and
considered "correct".*

<str name="spellcheck.alternativeTermCount">2</str>
*Specify the number of suggestions to return for each query term existing in
the index and/or dictionary. Presumably, users will want fewer suggestions
for words with docFrequency>0. Also setting this value turns "on"
context-sensitive spell suggestions.*

As a general suggestion, you may want to play with those parameters, as
sometime you may need suggestions even if the term is in the index ( it can
happen a mispelled term is in the index, but the corrected version is
appearing much more frequently and deservers a better treatment).
With Only More popular enabled you can play with thresholds of document
frequencies with : 
maxQueryFrequency and thresholdTokenFrequency.

*At first, spellchecker analyses incoming query words by looking up them in
the index. Only query words, which are absent in index or too rare ones
(below maxQueryFrequency ) are considered as misspelled and used for finding
suggestions. Words which are frequent than maxQueryFrequency bypass
spellchecker unchanged. After suggestions for every misspelled word are
found they are filtered for enough frequency with thresholdTokenFrequency as
boundary value. These parameters (maxQueryFrequency and
thresholdTokenFrequency) can be a percentage (such as .01, or 1%) or an
absolute value (such as 4).  *     

N.B. this is taken from the Official Solr Wiki. We deeply encourage users to
first read the documentation.



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrSpellChecker-returning-suggestions-for-words-present-in-index-tp4334554p4334586.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to