MySQL Forums
Forum List  »  PHP

Re: Improving Ranking of search results in a product search script
Posted by: fatjoe slim
Date: December 13, 2005 05:00PM

Gotten a bit further:

$query = 'select *, ((MATCH(`title`) AGAINST ("'.$word.'"))*2)+((MATCH(`description`) AGAINST ("'.$word.'"))) AS relevancy FROM '.$prefix.'store_inventory where MATCH(`title`) AGAINST ("'.$word.'") and MATCH(`description`) AGAINST ("'.$word.'") ORDER BY relevancy DESC '.$limitvalue.', '.$limit.'';

Few problems remain:

1. If $word = 'windows xp' Query finds results with Windows OR xp in the title/description. It should be searching for Windows AND xp

2. Page number has gone beserk because search.php uses a different query to generate page numbers -.-!!!

3. A search for "Gaming" does not return a product with the title "Athlon 64 Gaming System"... Uncertain as to why...

Help on either problem by anyone is appreciated

Options: ReplyQuote


Subject
Written By
Posted
Re: Improving Ranking of search results in a product search script
December 13, 2005 05:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.