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

ASF GitHub Bot commented on SOLR-6271:
--------------------------------------

GitHub user gmcoringa opened a pull request:

    https://github.com/apache/lucene-solr/pull/135

    SOLR-6271: ConjunctionSolrSpellChecker wrong check for same string distance

    ConjunctionSolrSpellChecher now uses equals method to check for same string 
distance.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/elo7/lucene-solr SOLR-6271

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/135.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #135
    
----
commit 1856fc9bf18dd3d2528c1200e11b15ec122b9b2c
Author: Fabiano V. Santos <[email protected]>
Date:   2015-03-17T16:44:09Z

    ConjunctionSolrSpellChecher now uses equals method to check for same string 
distance

----


> ConjunctionSolrSpellChecker wrong check for same string distance
> ----------------------------------------------------------------
>
>                 Key: SOLR-6271
>                 URL: https://issues.apache.org/jira/browse/SOLR-6271
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 4.9
>            Reporter: Igor Kostromin
>
> See ConjunctionSolrSpellChecker.java
> try {
>       if (stringDistance == null) {
>         stringDistance = checker.getStringDistance();
>       } else if (stringDistance != checker.getStringDistance()) {
>         throw new IllegalArgumentException(
>             "All checkers need to use the same StringDistance.");
>       }
>     } catch (UnsupportedOperationException uoe) {
>       // ignore
>     }
> In line stringDistance != checker.getStringDistance() there is comparing by 
> references. So if you are using 2 or more spellcheckers with same distance 
> algorithm, exception will be thrown anyway.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to