NYCPHP Meetup

NYPHP.org

[nycphp-talk] Recommendations for fine-tuning FULLTEXT search indexing MySQL 3.23.41

Phil Powell phillip.powell at adnet-sys.com
Wed Mar 17 13:01:47 EST 2004


Consider the following query:

SELECT id, CONCAT(lname,', ',fname,' ',mi) as 
name,citizen,major,minor,gpa,internship_eo, MATCH 
(fname,lname,email,enrollment_status,enrollment_type,enrollment_year,major,minor,agencies,internship_eo,internship_sponsors,activities,reasons,resume) 
AGAINST ('Computer') as score FROM interns WHERE MATCH 
(fname,lname,email,enrollment_status,enrollment_type,enrollment_year,major,minor,agencies,internship_eo,internship_sponsors,activities,reasons,resume) 
AGAINST ('Computer')

If I run this query I get 0 results back, however, I can easily verify 
by peeking into the database that at least one of the columns in MATCH() 
for at least 1 record contains the word 'Computer'.

If I use this query instead:

SELECT id, CONCAT(lname,', ',fname,' ',mi) as 
name,citizen,major,minor,gpa,internship_eo, MATCH 
(fname,lname,email,enrollment_status,enrollment_type,enrollment_year,major,minor,agencies,internship_eo,internship_sponsors,activities,reasons,resume) 
AGAINST ('Computers') as score FROM interns WHERE MATCH 
(fname,lname,email,enrollment_status,enrollment_type,enrollment_year,major,minor,agencies,internship_eo,internship_sponsors,activities,reasons,resume) 
AGAINST ('Computers')

I get results coming back, even from those where none of the columns in 
the MATCH() contain the word 'Computers' (but contain the word 'Computer').

If anyone has ever worked with MySQL 3.23.41 MyISAM tables with FULLTEXT 
search indexes, please let me know how I can fine-tune this to function 
properly upon a search word(s).

Thanx
Phil

-- 
Phil Powell
Web Developer
  ADNET Systems, Inc.
  11260 Roger Bacon Drive, Suite 403
  Reston, VA  20190-5203
Phone: (703) 709-7218 x107   Cell: (571) 437-4430   FAX: (703) 709-7219
EMail:  Phillip.Powell at adnet-sys.com      AOL IM: SOA Dude







More information about the talk mailing list