MySQL Forums
Forum List  »  Newbie

Re: Boolean Full-Text Searches (only for one column)
Posted by: floridankameli
Date: May 31, 2005 12:44PM

Thanks for help. But it still does not work. I have tried to solve this problem in Windows and Linux but in both MySQL behaves same...

Here is the full example:
CREATE TABLE a(
id INT UNSIGNED NOT NULL,
title VARCHAR(160) NOT NULL DEFAULT '',
keywords TEXT NOT NULL,
PRIMARY KEY(id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE a ADD FULLTEXT(title, keywords);

INSERT INTO a VALUES(0, 'title0', 'keywords0');
INSERT INTO a VALUES(1, 'title1', 'keywords1');

EXPLAIN SELECT title FROM archive WHERE MATCH(title) AGAINST ('something' IN BOOLEAN MODE);
EXPLAIN SELECT title FROM archive WHERE MATCH(keywords) AGAINST ('something' IN BOOLEAN MODE);
EXPLAIN SELECT title FROM archive WHERE MATCH(title, keywords) AGAINST ('something' IN BOOLEAN MODE);

DESCRIBE a;


The type in third EXPLAIN is: ALL (in first and second FULLTEXT). Which is the worst case I think. Also DESCRIBE tells that only "title" field has index but not the keywords.

Options: ReplyQuote


Subject
Written By
Posted
Re: Boolean Full-Text Searches (only for one column)
May 31, 2005 12:44PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.