[ 
https://issues.apache.org/jira/browse/SOLR-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135468#comment-13135468
 ] 

James Dyer commented on SOLR-2853:
----------------------------------

Matt,

Thanks for taking such a deep dive into this code.  Its great to see people 
checking for things like this.  I think the current code is correct, however.  
What PossibilityIterator is returning is a set of word combinations that 
SpellCheckCollator then needs to test against the index.  So 
PossibilityIterator will return up to "maxTries" word combinations.  But some 
of these possibilities could be nonsense and will return 0 hits when queried 
for against the index. SpellCheckCollator will throw these 0-hit possibilities 
out, trying each possibility until it has as many good ones as requested by 
"maxCollations", or until it has exhausted the list.  (If the user sets 
maxCollationTries to zero, SpellCheckCollator won't test any and in this case 
will just return the first "maxCollations" possibilities back to the user.)  
Make sense? 
                
> 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]

Reply via email to