[
https://issues.apache.org/jira/browse/SOLR-3457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280554#comment-13280554
]
James Dyer commented on SOLR-3457:
----------------------------------
I've found this happens with DirectSolrSpellChecker, which the example was
migrated to somewhat recently. I have a fix incorporated into SOLR-2585, which
I will commit soon unless there are objections. This changes the behavior of
"correctlySpelled" slightly. The new behavior sets it to "true" if the user's
query has at least 1 hit. The exception to this is if the new
"maxResultsForSuggest" parameter is invoked, the value supplied here would be
the threshold hits that flips "correctlySpelled". All tests pass with this
logic change.
My feeling is that possibly in the past certain proxy metrics were used to
determine if FileBasedSpellChecker was being used and if so, "correctlySpelled"
was supposed to behave differently. I can't tell this for sure because there
doesn't seem to be any explicit tests that enforce such behavior.
Unfortunately DirectSolrSpellChecker also triggers some of this logic.
Removing this extra logic around the "correctlySpelled" flag fixes the problem
described here. If this somehow breaks expected (but not covered in unit test)
behavior with FileBasedSpellchecker, we can handle that separately should
someone speak up.
> Spellchecker always incorrectly spelled
> ---------------------------------------
>
> Key: SOLR-3457
> URL: https://issues.apache.org/jira/browse/SOLR-3457
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Affects Versions: 4.0
> Environment: solr-spec 4.0.0.2012.05.15.11.42.06
> solr-impl 4.0-SNAPSHOT 1338601 - markus - 2012-05-15 11:42:06
> lucene-spec 4.0-SNAPSHOT
> lucene-impl 4.0-SNAPSHOT 1338601 - markus - 2012-05-15 10:51:02
> Reporter: Markus Jelsma
> Attachments: SOLR-3457-4.0-1.patch
>
>
> correctlySpelled is always false with default configuration, example config
> and example documents:
> http://localhost:8983/solr/collection1/browse?wt=xml&spellcheck.extendedResults=true&q=samsung
> {code}
> <lst name="spellcheck">
> <lst name="suggestions">
> <bool name="correctlySpelled">false</bool>
> </lst>
> </lst>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]