[
https://issues.apache.org/jira/browse/SOLR-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136014#comment-13136014
]
James Dyer commented on SOLR-2853:
----------------------------------
Matt,
Actuall, if you wouldn't mind, could you re-open this one (I can't), or
otherwise I can open another issue. Taking a closer look after reading your
last comment, there is a bug in the case the user sets "maxCollationTries" to
0. In SpellCheckCollator, we have:
{code}
if (maxTries < 1) {
maxTries = 1;
verifyCandidateWithQuery = false;
}
{code}
But I think in this case we need it to set "maxTries" to the same value as
"maxCollations". The current code will, as you point out, only return 1
collation no mater how many the user specified, unless "maxTries" > 0. I would
think most users who want multiple collations would also want them verified, so
this is probably not something that would get easily caught. An extra test
case might be prudent as well.
> SpellCheckCollator.collate method creates the a PossibilityIterator with
> maxTries instead of maxCollations
> ----------------------------------------------------------------------------------------------------------
>
> Key: SOLR-2853
> URL: https://issues.apache.org/jira/browse/SOLR-2853
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Affects Versions: 3.3, 4.0
> Reporter: Matt Traynham
> Priority: Minor
>
> Class SpellCheckCollator creates a new possibility iterator based on the
> spellcheck results. The iterator is created with:
> PossibilityIterator possibilityIter = new
> PossibilityIterator(result.getSuggestions(), maxTries, maxEvaluations);
> The issue is maxTries, should be maxCollations. Correct me if I'm wrong.
--
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]