Hello All,
I've got search for very small database working fine. However, I'd like to tune
this to have
different weights for words, because I'm not happy with the search results.
Are there any good books or whitepapers on tuning mysql for fulltext search?
Here's the query:
$dbObject->DatabaseQuery('SELECT id, title, body, links_to,'
. ' MATCH(title, body)'
. ' AGAINST (' . $dbObject->Safe($searchStr)
. ' IN BOOLEAN MODE)'
. ' AS score FROM ' . DATABASE_TABLE_CONTENT
. ' WHERE MATCH (title, body)'
. ' AGAINST (' . $dbObject->Safe($searchStr)
. ' IN BOOLEAN MODE)'
. ' ORDER BY score DESC',
constReturnArray, LOG_LEVEL_DEBUG);
And here's the index code:
$dbObject->DatabaseQuery('CREATE FULLTEXT INDEX skillings_index ON ' .
DATABASE_TABLE_CONTENT . ' (title, body);', constReturnNone,
LOG_LEVEL_DEBUG);
- Ben
Ben Sgro, Chief Engineer
ProjectSkyLine - Defining New Horizons
Our company: www.projectskyline.com
Our products: www.project-contact.com
This e-mail is confidential information intended only for the use of the
individual to whom it is addressed._______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php