MySQL Forums
Forum List  »  Full-Text Search

partial word search with FULLTEXT
Posted by: Cread Cdd
Date: August 31, 2006 01:10PM

MySQL FULLTEXT searches support wildcard suffixes such as:

mysql> SELECT * FROM articles WHERE MATCH (title,body)
-> AGAINST ('apple*' IN BOOLEAN MODE);

which returns all title/body lines that contain the prefix 'apple',
such as

appleby
appleseed

but not

bigapple
redapple

This is described online at:

http://dev.mysql.com/doc/refman/4.1/en/fulltext-boolean.html

Question: can FULLTEXT be configured to support wildcard
prefixes _and_ suffixes simultaneously? IE, something like:

mysql> SELECT * FROM articles WHERE MATCH (title,body)
-> AGAINST ('*apple*' IN BOOLEAN MODE);

so that we would get back all of the above results:

appleby
appleseed
bigapple
redapple

Thanks,
creadcdd

Options: ReplyQuote


Subject
Views
Written By
Posted
partial word search with FULLTEXT
46571
August 31, 2006 01:10PM
14225
August 31, 2006 01:23PM


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.