Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[MySQL 3.23] bug in fulltext search?

Status
Not open for further replies.

phpsourcerer

Programmer
Jul 10, 2003
2
DE
match/against doesnt find anything while like crashes the live server frequently ... live db has some 20000 rows (of 30 columns each); I´ve set up a test table with just for rows:

Code:
CREATE TABLE `matchtest` (
  `id` varchar(32) NOT NULL default '',
  `title` varchar(255) default NULL,
  `description` text,
  PRIMARY KEY  (`id`),
  KEY `title` (`title`),
  FULLTEXT KEY `description` (`description`)
);

INSERT INTO matchtest VALUES (1, 'something', 'blahblahblah ... newish ... moreblahblah');
INSERT INTO matchtest VALUES (2, 'some other thing', 'foobar ... good as new ... etcpp');
INSERT INTO matchtest VALUES (3, 'foobar', 'something newish');
INSERT INTO matchtest VALUES (4, 'test 4', 'newish');

select title, description
  , MATCH (description) AGAINST ('newish')
  , description like '%newish%'
from matchtest

ID/match result/like result
1/0/1
2/0/0
3/0/1
4/0/1

It´s always 0 ... even if the column value is identical to the search parameter. Does anybody know a wayout that searches the table _fast_ and _reliable_?
 
hmm ... adding a few rows not matching the word seems to help in my test DB. Now I found out how the 50% rule works.

INSERT INTO `matchtest` VALUES ('5', 'nofind 1', 'nothing');
INSERT INTO `matchtest` VALUES ('6', 'nofind 2', 'old as stone');
INSERT INTO `matchtest` VALUES ('7', 'nofind 3', 'dummy');
INSERT INTO `matchtest` VALUES ('8', 'nofind 4', 'crashtest');

But still, "match ... against" gives me no result from the live DB when searching for a keyword that is definitely in "description" in (definitely onlly) a few rows.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top