dfrojd Posted September 19, 2006 Share Posted September 19, 2006 HI, I am using a Fulltext query with rank as described in:[dev.mysql.com]with score to list most relevant hits for a php project.Now using a large database with 7000 entries and a long "against" String I am returned too many results with scores ranging fro ~6.xxx to 0.00xxx.Could someone please explain how to modify my query so that only results with a relevance (score) greater than 1 are returned.My Query now is:---------------------------$against = "Hotel City Cityreise Cityreisen Städtereise Städtereisen";$query = "SELECT DISTINCT obj_lfd, obj_bez, obj_krz, obj_img_path_01,";$query .= "MATCH (";$query .= "obj_bez, ";$query .= "obj_krz, ";$query .= "obj_region_text, ";$query .= "obj_ort, ";$query .= "obj_detail, ";$query .= "obj_freizeit, ";$query .= "obj_sonst, ";$query .= "obj_ort_info, ";$query .= "obj_anreise_info, ";$query .= "obj_add_desc_01, ";$query .= "obj_cont_desc_01, ";$query .= "obj_add_desc_02, ";$query .= "obj_cont_desc_02, ";$query .= "obj_add_desc_03, ";$query .= "obj_cont_desc_03, ";$query .= "obj_img_desc_01 ";$query .= ") AGAINST ('";$query .= $against;$query .= "') as score ";$query .= "FROM objekte WHERE MATCH ";$query .= "( ";$query .= "obj_bez, ";$query .= "obj_krz, ";$query .= "obj_region_text, ";$query .= "obj_ort, ";$query .= "obj_detail, ";$query .= "obj_freizeit, ";$query .= "obj_sonst, ";$query .= "obj_ort_info, ";$query .= "obj_anreise_info, ";$query .= "obj_add_desc_01, ";$query .= "obj_cont_desc_01, ";$query .= "obj_add_desc_02, ";$query .= "obj_cont_desc_02, ";$query .= "obj_add_desc_03, ";$query .= "obj_cont_desc_03, ";$query .= "obj_img_desc_01 ";$query .= ") AGAINST ('";$query .= $against;$query .= "')";$query .= " limit $Anfangsposition, $Zeilen_pro_Seite"; Link to comment https://forums.phpfreaks.com/topic/21260-fulltext-match-with-score-only-top-needed-help-please/ Share on other sites More sharing options...
shoz Posted September 19, 2006 Share Posted September 19, 2006 [code]$query .= ") AGAINST ('";$query .= $against;$query .= "')";$query .= " > 1 ";$query .= " limit $Anfangsposition, $Zeilen_pro_Seite";[/code] Link to comment https://forums.phpfreaks.com/topic/21260-fulltext-match-with-score-only-top-needed-help-please/#findComment-94599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.