I am creating a searchable quotes database here is my table:
CREATE TABLE QOT_body (
qotb_id int(11) NOT NULL auto_increment,
qotb_body text NOT NULL,
qotb_author varchar(255) NOT NULL default '',
qotb_views bigint(20) NOT NULL default '0',
qotb_rating int(11) default NULL,
qotb_ratings bigint(20) NOT NULL default '0',
qotb_priority int(11) NOT NULL default '0',
qotc_id int(11) NOT NULL default '0',
qots_id int(11) default '0',
PRIMARY KEY (qotb_id),
FULLTEXT KEY qotb_author (qotb_author),
FULLTEXT KEY qotb_body (qotb_body)
) TYPE=MyISAM COMMENT='Quote Body';
==================================================
Here is my problem, and maybe i just dont understand Fulltext enough......
1) when i created the fulltext indexes on qotb_author and qotb_body, qotb_body came back with an index size of 1 (im using phpMyAdmin) Does index size have any effect on search results?
Index Structure From phpMyAdmin below:
Indexes : [Documentation]
Keyname |Type |Cardinality |Action |Field |
PRIMARY |PRIMARY |13 |Drop Edit |qotb_id |
qotb_author |FULLTEXT |None |Drop Edit |qotb_author |
qotb_body |FULLTEXT |None |Drop Edit |qotb_body |1
==================================================
2) Given all the above.. I am looking for a way to do a 'multiple' fulltext search on several fields. I know i can MATCH(field1, field2) AGAINST('searchstring') but thats not what I'm looking for.
I want to MATCH(field1) AGAINST('string1') AND/OR MATCH(field2) AGAINST('string2')
Essentialy I want to allow people to search the body of the quote text and the varchar field author seperatly if they choose. Is this possable? 😕
Thanks!