List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 13 2002 7:48pm
Subject:Re: full-text search problems (newbie)
View as plain text  
At 11:11 -0700 10/13/02, Alan wrote:
>Hi folks, new to the list, hoping I'm posting to the right one.
>
>I've been using the full-text search for a clients site and it works
>great... the only problem is I want to change the minimum word length
>from 4 to lower, such as 2 or 3.  Reading the docs this is simple, and I
>followed the instructions I found on various newsgroups and of course
>the mysql documentation.
>
>(BTW, I'm using the linux binary distribution of 4.0.4-beta)
>
>Anyway, in /etc/my.cnf I set:
>
>set-variable   = ft_min_word_len=3
>
>And then I did an "alter table foo type=MyISAM" as instructed, restarted
>mysql, and logged in.
>
>I can see the ft_min_word_len is set to 3 with show variables
>
>| flush_time                      | 0   |
>| ft_min_word_len                 | 2   |
>| ft_max_word_len                 | 254 |
>| ft_max_word_len_for_sort        | 20  |
>
>My table is set up as follows:
>CREATE TABLE content (
>		articledate int(10) NOT NULL default '0',
>		title varchar(255) default '',
>		center_content text,
>		right_content text,
>		main_content int(10) default '0',
>		token varchar(64) default '',
>		UNIQUE KEY sd (articledate),
>		KEY ti (title),
>		FULLTEXT KEY txt (title,center_content,right_content)
>		) TYPE=MyISAM COMMENT='Content Table';
>
>When I execute the following statement, I get results:
>
>mysql> select title from content where match
>(title,center_content,right_content) against ('updates');
>+-----------------------------+
>| title                       |
>+-----------------------------+
>| eXI Systems' Latest Updates |
>+-----------------------------+
>1 row in set (0.00 sec)
>
>But when I try to match on 'exi', I get:
>
>mysql> select title from content where match
>(title,center_content,right_content) against ('exi');
>Empty set (0.00 sec)
>
>As far as I can tell, this *should* be working.  Can anyone help please?

Try dropping the FULLTEXT index and then add it again.  (Alternatively,
dump and reload the table).

>
>Regards and TIA.
>
>alan

Thread
full-text search problems (newbie)Alan13 Oct
  • Re: full-text search problems (newbie)Paul DuBois13 Oct
    • Re: full-text search problems (newbie)Alan14 Oct
  • Re: full-text search problems (newbie)Sergei Golubchik14 Oct
    • Re: full-text search problems (newbie)Alan14 Oct