This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/search.php
Chris Morgan 717ebf0f5e Add fuzzy matching using php's similar_text. Default to using 60% minimum
match. Show fuzzy matches below the 'like matches' table so users can tell
the results apart. Exclude like matches from fuzzy match results to avoid
duplicate results.
2005-06-03 04:37:40 +00:00

27 lines
646 B
PHP

<?php
/*****************/
/* search engine */
/*****************/
/*
* application environment
*/
include("path.php");
require(BASE."include/incl.php");
require(BASE."include/application.php");
apidb_header("Search Results");
echo "<center><b>Like matches</b></center>";
$hResult = searchForApplication($_REQUEST['q']);
outputSearchTableForhResult($_REQUEST['q'], $hResult);
$minMatchingPercent = 60;
echo "<center><b>Fuzzy matches - minimum ".$minMatchingPercent."% match</b></center>";
$hResult = searchForApplicationFuzzy($_REQUEST['q'], $minMatchingPercent);
outputSearchTableForhResult($_REQUEST['q'], $hResult);
apidb_footer();
?>