I’m having an issue with trying to perform a full text search on a table in mysql. The table in question has the following create command:
CREATE TABLE IF NOT EXISTS `resume_contents`
(`resumeid` int(100) NOT NULL AUTO_INCREMENT,
`jobseekerid` varchar(255) NOT NULL,
`resumecontents` text,
PRIMARY KEY (`resumeid`),
UNIQUE KEY `jobseekerid` (`jobseekerid`),
FULLTEXT KEY `resumecontents` (`resumecontents`) )
ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
So basically just 3 columns with fulltext on one column only. Then when I try and do a full text search with the following command:
SELECT * FROM `resume_contents` WHERE MATCH (resumecontents) AGAINST('')
I get an empty result set everytime, no matter what words are in the against clause. What stupid error am I making here?
As an example here is a row I’m testing with, it has a resume sample from resume.com.
INSERT INTO `resume_contents` (`resumeid`, `jobseekerid`, `resumecontents`) VALUES (2, '14', 'Objectives\nI am looking for a position at This Company where I can maximize my programming skills, project management, leadership skills, and create new and exciting tools.\n\n\nSummary\nI have had 3 years experience in web design and development. I am fimilar with a lot of the languages and software used in creating projects for the web. Futhermore, I have great project management skills and also work well either alone or with a group. I have also worked on small projects and large public releases for large companies.\n\n\nEducation\nDesign Media \nCollege Humor, Seattle, WA\nGraduated: January 2008 \nGrade: College\n\nEmployment History\nDecember 2007 – Present: Web Designer \nCompany: ComStream\nSeattle, Washington\nWorked as team lead on many different client projects.\n\n\nProfessional Skills\nAdobe Photoshop – Expert\n\nAdobe Illustrator – Expert\n\nAdobe Dreamweaver – Advanced\n\nPhp – Advanced\n\n\nQualification/Certification\nJanuary 2006: New Media Design \nOrganization: School of Technology\nAward: \nSan Fransico\nLanguages\nCzech – Beginner\n\nVietnamese – Conversational\n\n\nImmigration / Work Status\nDecember 2041 – Permanent Resident - United States');
Then I search with :
SELECT * FROM `resume_contents` WHERE MATCH(`resumecontents`) AGAINST ('Company')
Or just about any word or phrase (any length, any word) which I know is in there… and still it returns an empty set.
I know it must be something simple I’m missing but I don’t know what it could be.
What words? You know, that there are certain words that are not considered like “the” or “how”, words that just appear to often to be meaningful. Then the words have to have a minimum length.
And finally!
I bet that is the case here. Read more about it here.