mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gbellato
08.51.2006 39bfc58fc0c438ae24a9fc03aaf96ce966697aea
Commit fix for issue 627 : 
cigale and sigale are not recognized as matching by the implementation of
the Double metaphone algorithme in DoubleMetaphoneApproximateMatchingRule

accacia and akacia are not recognized as matching by the implementation of
the Double metaphone algorithme in DoubleMetaphoneApproximateMatchingRule
1 files modified
8 ■■■■ changed files
opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java 8 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
@@ -399,7 +399,7 @@
          // Check for a double C but not in values that start with "McC"
          if ((posPlusOne == 'C') &&
              (! ((pos == 1) || valueString.charAt(0) == 'M')))
              (! ((pos == 1) && valueString.charAt(0) == 'M')))
          {
            if ((((posPlusTwo = valueString.charAt(pos+2)) == 'I') ||
                 (posPlusTwo == 'E') || (posPlusTwo == 'H')) &&
@@ -434,8 +434,8 @@
          // Check for CK, CG, or CQ and map to 'K'.  Check for CI, CE, and CY
          // and map to "S".
          if (((posPlusTwo = valueString.charAt(pos+2)) == 'K') ||
              (posPlusTwo == 'G') || (posPlusTwo == 'Q'))
          if (((posPlusOne = valueString.charAt(pos+1)) == 'K') ||
              (posPlusOne == 'G') || (posPlusOne == 'Q'))
          {
            metaphone.append("K");
            pos += 2;
@@ -444,7 +444,7 @@
          // Check for CI, CE, or CY and map to 'S'.
          if ((posPlusTwo == 'I') || (posPlusTwo == 'E') || (posPlusTwo == 'Y'))
          if ((posPlusOne == 'I') || (posPlusOne == 'E') || (posPlusOne == 'Y'))
          {
            metaphone.append("S");
            pos += 2;