From: Wolfgang M. M. <wol...@us...> - 2004-06-16 11:47:07
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19166/src/org/exist/xquery/functions Modified Files: ExtNear.java Log Message: Included patch for near(). Index: ExtNear.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xquery/functions/ExtNear.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExtNear.java 25 Mar 2004 12:38:53 -0000 1.2 --- ExtNear.java 16 Jun 2004 11:46:57 -0000 1.3 *************** *** 118,122 **** distance = -1; ! } else if (word.equalsIgnoreCase(term)) { distance = 0; j++; --- 118,123 ---- distance = -1; ! } // that else would cause some words to be ignored in the matching ! if (word.equalsIgnoreCase(term)) { distance = 0; j++; *************** *** 134,138 **** distance = 0 ; continue; ! } else if (-1 < distance) ++distance; --- 135,140 ---- distance = 0 ; continue; ! } // that else MAY cause the distance count to be off by one but i'm not sure ! if (-1 < distance) ++distance; |