Hi Matt, thanks for shedding light on the version and key_len issues.
Either phpMyAdmin or MySQL is labelling the return of blank results as an error, thus my use of the term. The output from phpMyAdmin looks like this:
Error
SQL-query:
SELECT subject FROM entry WHERE MATCH (subject) AGAINST ('spam');
MySQL said:
That seemed less than informative to me, so I tried EXPLAIN, hoping to uncover a clue:
table type possible_keys key key_len ref rows Extra -------------------------------------------------------------------------- entry fulltext subject_index subject_index 0 1 where used
Regarding the search term, in response to your comment I tried different searches, for words either at the beginning, middle, or end of the strings which are stored in the "subject" column, but they all returned blank results such as seen above.
General questions to the list:
key_len of 0 is okay, I know now . . . but should rows be 1 when the DB has 16 (now 19) records?
Is the syntax I'm using for the query, and to add the index, okay?
Is there an SQL command I can use to "look into" the index and see if it actually contains anything?
From: "Matt W" <[EMAIL PROTECTED]> To: "Don Dikunetsis" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: Re: fulltext search always returns no results Date: Thu, 26 Feb 2004 01:26:17 -0600
Hi Don,
No, full-text search was added in MySQL 3.23.23, I believe (4.0.1 just added boolean searches along with more speed overall). It doesn't need to be compiled in or anything, it's there by default. Unless someone compiled it and actually *removed* the full-text code or something. :-)
Also, key_len of 0 in EXPLAIN is normal.
It sounded like you are getting some kind of error in your first message? If so, what is it? Are you SURE that the EXACT word you're searching for is present in the table (for example, with a space, etc. on either side of it)?
Matt
----- Original Message ----- From: "Don Dikunetsis" Sent: Thursday, February 26, 2004 12:21 AM Subject: Re: fulltext search always returns no results
> > Hi, thanks for your reply, but it looks like: > > > As of Version 3.23.23, MySQL has support for full-text indexing and > searching. > > --according to: > > http://www.mysql.com/doc/en/Fulltext_Search.html > > However, I would be unsurprised (though disappointed) to find that the > answer is some variant of "this won't work with your configuration"--my > setup certainly doesn't seem to be responding to the normal setup > instructions for fulltext search. > > > >From: <[EMAIL PROTECTED]> > >Subject: Re: fulltext search always returns no results > >Date: Thu, 26 Feb 2004 10:12:42 +1100 (EST) > > > >Excuse if i'm not correct but this may be your problemo ? > > > >MySQL 3.23.55 running on my webhost's Linux box > >phpMyAdmin 2.1.0 > > > > > >I didnt think fulltext was in 3.23 wasnt this a Mysql 4 feature ?? > > > > > > > Summary: When I run a fulltext search, it always returns no results. I > > > have added a fulltext index to the column being searched. Also, I am > > > searching for a term that is in the table, but not in more than 50% of > > > the rows. > > > > > > I notice that when I add EXPLAIN to my search, the key_len of my > > > fulltext index is 0. Does that mean my fulltext index is empty, > > > explaining why my searches never return any results? > > > > > > Either way, I'd be grateful for any suggestions on how to get fulltext > > > search to work!
_________________________________________________________________
Store more e-mails with MSN Hotmail Extra Storage – 4 plans to choose from! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]