FULLTEXT index problem
Posted 11 June 2006 - 10:34 PM
When I put only one argument in MATCH, it shows no error but doesn't return anything
SELECT * FROM item WHERE MATCH (nom) against ('Huile');
SELECT * FROM item WHERE MATCH (nom_en) against ('Huile');
When I put two arguments:
SELECT * FROM item WHERE MATCH (nom,nom_en) against ('Huile');
It says: "Can't find FULLTEXT index matching the column list", but both nom and nom_en are FULLTEXT indexed.
Anyone can help? thank you
Posted 12 June 2006 - 02:19 PM
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]"The MATCH() column list must exactly match the column list in some FULLTEXT index definition for the table, unless this MATCH() is IN BOOLEAN MODE."[/quote]
That's probably why you're getting the "Can't find FULLTEXT index matching the column list" error -- the two columns weren't defined together.
Also, if you're using small dataset to test your FULLTEXT searches, remember the following (also from the manual):
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]"A word that matches half of rows in a table is less likely to locate relevant documents. In fact, it will most likely find plenty of irrelevant documents. We all know this happens far too often when we are trying to find something on the Internet with a search engine. It is with this reasoning that rows containing the word are assigned a low semantic value for the particular dataset in which they occur. A given word may exceed the 50% threshold in one dataset but not another.... The 50% threshold has a significant implication when you first try full-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more."[/quote]
And then there's the possiblity that you don't have the word "Huile" in the dataset at all, but I assume you've checked that. As an aside, if I remember correctly columns in indicies can be used in the order they're defined for non-FULLTEXT indicies, i.e., INDEX (lastname,firstname) can be searched on (lastname,firstname) or (lastname) but not (firstname).
Posted 12 June 2006 - 04:56 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users