try experimenting with the weighting given to keywords found in certain areas. It sounds like you want to highly favor keywords found in the title so try bumping up $topscore for the title section.
Maybe something like ($topscore changed from 4 to 10 for by_title):
Code:
#
# Generate additional fields string
#
$add_fields_string = '';
$scorestr="";
// Add score to fields - LNJ
if (!empty($data["by_title"]) && count($search_words)>0) {
$scorestr.="if($sql_tbl[products].product like '%". $data["substring"] ."%',5,0) + "; //Add high score for exact match - LNJ
$topscore=10; // Yeah I know HARDCODED - LNJ
$scoredesc=$topscore/count($search_words); //Get decrementing number for scores - LNJ
foreach($search_words as $search_word){
$scorestr.="if($sql_tbl[products].product like '%". $search_word ."%',$topscore,0) + "; //add individual word score - LNJ
$topscore=$topscore-$scoredesc; //Descrement individual score for word - LNJ
}
}
if (!empty($data["by_shortdescr"]) && count($search_words)>0) {
$scorestr.="if($sql_tbl[products].descr like '%". $data["substring"] ."%',3,0) + "; //Add high score for exact match - LNJ
$topscore=2;
$scoredesc=$topscore/count($search_words); //Get decrementing number for scores - LNJ
foreach($search_words as $search_word){
$scorestr.="if($sql_tbl[products].descr like '%". $search_word ."%',$topscore,0) + "; //add individual word score - LNJ
$topscore=$topscore-$scoredesc;//Descrement individual score for word - LNJ
}
}
if (!empty($data["by_longdescr"]) && count($search_words)>0) {
$scorestr.="if($sql_tbl[products].fulldescr like '%". $data["substring"] ."%',3,0) + "; //Add high score for exact match - LNJ
$topscore=2;
$scoredesc=$topscore/count($search_words); //Get decrementing number for scores - LNJ
foreach($search_words as $search_word){
$scorestr.="if($sql_tbl[products].fulldescr like '%". $search_word ."%',$topscore,0) + "; //add individual word score - LNJ
$topscore=$topscore-$scoredesc;//Descrement individual score for word - LNJ
}
}
See if you can find optimal settings for the results you're looking for.