Hi clever people,
I've just starting to experiment with Fulltext searching and I have the problem with wanting to match partial words i.e. someone enters the search term "water" I want it to not only return records with "water" but also "Waterloo" and Waterwheel" etc.
I have read the manual and it says to put in "With query expansion" at the end of the "Against" field however this is where the problem starts.
Here is my search string that works in that it will return records with an exact match (without the quotes around it):
"Select number, establishment, address1, address2, suburb, city, cuisine1, cuisine2, cuisine3, description from Main where active = 1 and number >= 1000 and establishment <> '' and city = 'Wellington' and match (establishment, proprietor, address1, address2, suburb, city, cuisine1, cuisine2, cuisine3, description) against ('water')"
This returns rows with the term "water" in it but I want "Waterloo" etc to come back as well so I added "with query expansion" to the end of it so it looks like this (without the quotes around it):
"Select number, establishment, address1, address2, suburb, city, cuisine1, cuisine2, cuisine3, description from Main where active = 1 and number >= 1000 and establishment <> '' and city = 'Wellington' and match (establishment, proprietor, address1, address2, suburb, city, cuisine1, cuisine2, cuisine3, description) against ('water' with query expansion)"
however, now I get the message (without the quotes around it):
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'with query expansion)' at line 1"
Why does this not work? The manual says this is how you do it (see:
http://dev.mysql.com/doc/refman/4.1/en/fulltext-query-expansion.html)
I am using the MySqlManager.exe program that comes with "mysql-4.0.21-win.zip" (because I can't seem to get any other version to install on a Windows environment with appropriate ODBC drivers and still be able to communicate with my databases).
Any of you bright people have an answer for this?
Thanks
Mr. New to all this...
- Lester.
Update: I've just upgraded to verson 5 and it all seems to work now...
Edited 1 time(s). Last edit at 06/25/2006 05:58PM by Lester Brook.