MySQL Forums
Forum List  »  Full-Text Search

left truncation of search_string
Posted by: Alex Hoelzel
Date: November 23, 2005 12:53PM

Fulltext search in MySQL works perfectly for me with right-word-truncation using wildcard "*", but it does not work at all with left-truncation.

I would like to search for left-truncated strings in fulltext mode.

Example (assuming that my_table and fulltext-index on field_name were previously created):
SELECT ID FROM my_table WHERE MATCH(field_name) AGAINST ('*search_string' IN BOOLEAN MODE);
would find ID_field in all rows containing words ENDING on the string "search_string", but it does not give results.

Standard search with "LIKE"-operator works perfectly, but it is ugly slow !
Example:
SELECT ID FROM my_table WHERE field_name LIKE '%search_string';
finds all rows containing words ENDING on "search_string", but the search takes approx. 30 sec on a table containing (only) 80.000 rows.

Any suggestions ?

Options: ReplyQuote


Subject
Views
Written By
Posted
left truncation of search_string
7077
November 23, 2005 12:53PM
4471
December 07, 2005 08:13AM


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.