From 4a8d71aeb0ac38630199feaf67e191b0b35fa54f Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Fri, 08 Sep 2006 13:51:15 +0000
Subject: [PATCH] Commit fix for issue 627 : cigale and sigale are not recognized as matching by the implementation of the Double metaphone algorithme in DoubleMetaphoneApproximateMatchingRule
---
opendj-sdk/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java b/opendj-sdk/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
index de3e97f..79e368c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
+++ b/opendj-sdk/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;
--
Gitblit v1.10.0