Warning: Cannot modify header information - headers already sent by (output started at /home/.liana/solanos/solanosystems.com/index.php:11) in /home/.liana/solanos/solanosystems.com/wp-commentsrss2.php on line 8
Comments on: MySQL Relevancy Search http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/ Notes from a wandering developer in Minneapolis Mon, 13 Oct 2008 11:47:15 +0000 http://wordpress.org/?v=2.0.2 by: Peter http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-43453 Sun, 23 Mar 2008 12:05:47 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-43453 Great - thanks for the pointers, this makes life so much more easier - why didn't I know about it before? :) Great - thanks for the pointers, this makes life so much more easier - why didn’t I know about it before? :)

]]>
by: Jan http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-31586 Mon, 24 Sep 2007 18:59:45 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-31586 Nice instruction, definitely an easier thing than writing your own sorting algorithms... thanks! Nice instruction, definitely an easier thing than writing your own sorting algorithms… thanks!

]]>
by: Todd http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-27971 Wed, 08 Aug 2007 20:48:25 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-27971 Nevermind.. I was looking at mysql.com/docs and found this "In addition, words that are present in more than 50% of the rows are considered common and do not match. " I believe this is what is happening as I only have a few test rows. Nevermind.. I was looking at mysql.com/docs and found this “In addition, words that are present in more than 50% of the rows are considered common and do not match. ”

I believe this is what is happening as I only have a few test rows.

]]>
by: Todd http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-27964 Wed, 08 Aug 2007 19:34:20 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-27964 Anyone know why this sql string does not work with FULL TEXT but the #2 with boolean does? Returns nothing, not working 1.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST ('Work Order Reasons') AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST ('Work Order Reasons') ORDER BY score DESC WORKS: Returns 2 results 2.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST ('Work Order Reasons' IN BOOLEAN MODE) AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST ('Work Order Reasons' IN BOOLEAN MODE) ORDER BY score DESC Anyone know why this sql string does not work with FULL TEXT but the #2 with boolean does?

Returns nothing, not working
1.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’) AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’) ORDER BY score DESC

WORKS: Returns 2 results
2.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’ IN BOOLEAN MODE) AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’ IN BOOLEAN MODE) ORDER BY score DESC

]]>
by: Ryan http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26379 Sat, 21 Jul 2007 10:16:32 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26379 Thanks Mike, will give it a shot, nice article btw clear and easy to understand even for a novice like me! Thanks Mike, will give it a shot, nice article btw clear and easy to understand even for a novice like me!

]]>
by: Mike http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26359 Fri, 20 Jul 2007 22:55:01 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26359 You may want to try adding "error_reporting(E_ALL)" to the beginning of your code to see if you are producing any errors. You can also try running the Query manually through MySQL or even PHPMyAdmin to see if your SQL syntax is off. You may want to try adding “error_reporting(E_ALL)” to the beginning of your code to see if you are producing any errors.

You can also try running the Query manually through MySQL or even PHPMyAdmin to see if your SQL syntax is off.

]]>
by: Ryan http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26354 Fri, 20 Jul 2007 21:38:17 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26354 Hmm I just seem to get a blank page, no errors of anything ? My code: $search=$_GET['search']; $query = "SELECT *, MATCH (title, description, url) AGAINST ('$search') AS score FROM links WHERE MATCH (title, description, url) AGAINST ('$search')"; $result = mysql_query($query) or die(mysql_error()); any ideas ? Thanks Hmm I just seem to get a blank page, no errors of anything ?

My code:

$search=$_GET[’search’];

$query = “SELECT *, MATCH (title, description, url) AGAINST (’$search’) AS score FROM links WHERE MATCH (title, description, url)

AGAINST (’$search’)”;
$result = mysql_query($query) or die(mysql_error());

any ideas ? Thanks

]]>
by: Matt http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26337 Fri, 20 Jul 2007 15:04:22 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-26337 With regards to weighted columns, I was reading something in the boolean mode information in the MySQL manual that allowed for weighted operators. Hopefully this is of help to you. With regards to weighted columns, I was reading something in the boolean mode information in the MySQL manual that allowed for weighted operators. Hopefully this is of help to you.

]]>
by: Apurva http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-18048 Thu, 22 Mar 2007 10:45:41 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-18048 w00t, thank you, thank you, thank you. =D thank you so much for this... and also thanks to those awesome people at MySQL. =) w00t, thank you, thank you, thank you. =D

thank you so much for this… and also thanks to those awesome people at MySQL. =)

]]>
by: Gareth http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-9992 Tue, 31 Oct 2006 15:43:58 +0000 http://www.solanosystems.com/archives/2004/12/13/mysql-relevancy-search/#comment-9992 Great article - thank you! One question though... Is there any straight forward way of applying weighting to certain columns? For example, if my columns are "title" and "article", I would like matches in the title column to be more relevent than matches in the article column... Great article - thank you!

One question though… Is there any straight forward way of applying weighting to certain columns?

For example, if my columns are “title” and “article”, I would like matches in the title column to be more relevent than matches in the article column…

]]>