From 1022d47451eb8d4cae9e8b2273974dfc62e8d027 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 3 Jun 2005 23:41:16 +0000 Subject: [PATCH] Make fuzzy matches use case insensitive strings to improve match accuracy. --- include/util.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/util.php b/include/util.php index 7a0511f..fe2cc39 100644 --- a/include/util.php +++ b/include/util.php @@ -336,9 +336,13 @@ function searchForApplicationFuzzy($search_words, $minMatchingPercent) } $sQuery.=";"; + /* capitalize the search words */ + $search_words = strtoupper($search_words); + $hResult = query_appdb($sQuery); while($oRow = mysql_fetch_object($hResult)) { + $oRow->appName = strtoupper($oRow->appName); /* convert the appname to upper case */ similar_text($oRow->appName, $search_words, $similarity_pst); if(number_format($similarity_pst, 0) > $minMatchingPercent) {