Page 2 of 2

Reply

Posted: Tue Jan 30, 2007 2:17 pm
by user___
Sorry, it was a mistake(I have chosen "One" in between five hundred thousand English words). I appologize about that. You are right it works with other words but now it does not work when there are more than one word in box.
What is the matter?
I use the same table with this data:
id|title|user_id
1|Prime|1
2|Minister is fine|39
3|Hello to everyone|3

It works with "Prime" but with others two does not.

Posted: Tue Jan 30, 2007 2:22 pm
by pickle
These queries work fine for me with that data:

Code: Select all

select * from news where match(title) against ('Minister');
select * from news where match(title) against ('Minister fine');
select * from news where match(title) against ('Minister fine is');
1 row returned in all cases.

Create table syntax:

Code: Select all

CREATE TABLE `news` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `title` varchar(39) NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

Reply

Posted: Tue Jan 30, 2007 2:52 pm
by user___
Thank you guys. If you had not helped me, I would have not succeeded in solving that problem.

I think that the main problem was that all the tables had been in InnoDB before I decided to change them to MyISAM and I got this problem. The solution is:
Drop your tables and then recreate them in MyISAM(Update seems not to work properly).
Never use stop words for test tables.

Posted: Tue Jan 30, 2007 2:54 pm
by pickle
Good to hear.