You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jd...@apache.org on 2015/12/04 18:43:50 UTC

svn commit: r1718000 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java

Author: jdyer
Date: Fri Dec  4 17:43:50 2015
New Revision: 1718000

URL: http://svn.apache.org/viewvc?rev=1718000&view=rev
Log:
SOLR-6271: fix StringDistance comparison in CSSC. ( This closes #135 )

Added:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java
      - copied unchanged from r1717999, lucene/dev/trunk/solr/core/src/test/org/apache/solr/spelling/ConjunctionSolrSpellCheckerTest.java
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1718000&r1=1717999&r2=1718000&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Fri Dec  4 17:43:50 2015
@@ -28,6 +28,9 @@ Bug Fixes
 
 * SOLR-8366: ConcurrentUpdateSolrClient attempts to use response's content type as charset encoding
   for parsing exception. (shalin)
+  
+* SOLR-6271: fix ConjunctionSolrSpellChecker to not compare StringDistance by instance.
+  (Igor Kostromin via James Dyer)
 
 Other Changes
 ----------------------

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java?rev=1718000&r1=1717999&r2=1718000&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/spelling/ConjunctionSolrSpellChecker.java Fri Dec  4 17:43:50 2015
@@ -57,7 +57,7 @@ public class ConjunctionSolrSpellChecker
     try {
       if (stringDistance == null) {
         stringDistance = checker.getStringDistance();
-      } else if (stringDistance != checker.getStringDistance()) {
+      } else if (!stringDistance.equals(checker.getStringDistance())) {
         throw new IllegalArgumentException(
             "All checkers need to use the same StringDistance.");
       }