Make fuzzy matches use case insensitive strings to improve match accuracy.

This commit is contained in:
Chris Morgan
2005-06-03 23:41:16 +00:00
committed by WineHQ
parent 5c1f7f7948
commit 1022d47451

View File

@@ -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)
{