mysqlのテーブルで全文検索を実行しようとすると問題が発生します。問題のテーブルには、次のcreateコマンドがあります。
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 ;
つまり、基本的には3列だけで、1列だけに全文が表示されます。次に、次のコマンドを使用して全文検索を実行しようとすると、次のようになります。
SELECT * FROM `resume_contents` WHERE MATCH (resumecontents) AGAINST('')
反対句にどの単語が含まれていても、毎回空の結果セットが表示されます。私はここでどのような愚かなエラーを犯していますか?
ここでの例として、私がテストしている行があります。これには、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');
それから私はで検索します:
SELECT * FROM `resume_contents` WHERE MATCH(`resumecontents`) AGAINST ('Company')
または、私が知っているほぼすべての単語またはフレーズ(任意の長さ、任意の単語)がそこにあります...それでも空のセットを返します。私はそれが私が見逃している単純なものでなければならないことを知っていますが、それが何であるかはわかりません。