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

James Dyer commented on SOLR-2848:
----------------------------------

I would really like to get this issue resolved if possible.  Here are 3 
possible solutions:

1. The Nov 1 patch "SOLR-2848.patch" increases test coverage and makes the 
minimal changes to fix the distributed bug with DirectSolrSpellChecker.

2. The Nov 1 patch "SOLR-2848-refactoring.patch" also refactors the code, 
breaking the finishStage() method up and also moving the final merge into 
SolrSpellChecker.  This allows us to theoretically have different spell 
checkers choose to merge differently.  In practice, all of our spell checkers 
currently would use the same default version of "merge()"

3. We could dial back the changes in "SOLR-2848-refactoring.patch" to keep 
merge() as a method in SpellCheckComponent as all spell checkers use the same 
algorithm anyhow.  But we could keep the changes to make finishStage() more 
readable and, more importantly, keep the "getStringDistance()" and 
"getAccuracy()" methods in SolrSpellChecker.  This at least eliminates the need 
for "instanceof" checks, making Distributed Spell Check less brittle as new 
spell checkers are added.

Please advise how we should move forward.  (I like option #3 the best.  I can 
create a patch for this if desired.)  Thanks.



                
> DirectSolrSpellChecker fails in distributed environment
> -------------------------------------------------------
>
>                 Key: SOLR-2848
>                 URL: https://issues.apache.org/jira/browse/SOLR-2848
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud, spellchecker
>    Affects Versions: 4.0
>            Reporter: James Dyer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-2848-refactoring.patch, SOLR-2848.patch, 
> SOLR-2848.patch
>
>
> While working on SOLR-2585, it was brought to my attention that 
> DirectSolrSpellChecker has no test coverage involving a distributed 
> environment.  Here I am adding a random element to 
> DistributedSpellCheckComponentTest to alternate between the "IndexBased" and 
> "Direct" spell checkers.  Doing so revealed bugs in using 
> DirectSolrSpellChecker in a distributed environment.  The fixes here roughly 
> mirror those made to the "IndexBased" spell checker with SOLR-2083.

--
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to