Re: problems with searches for 'c#' and 'c++' fulltext
I think the answer is that it just can't be done yet with MySQL FULLTEXT searching because the + and # characters are not indexed. MySQL only indexes alphanumeric words with the addition of . and ' characters.
Two ways you might address the problem:
1) When you encounter such non-indexable words fall back to searching using basic LIKE 'c++' constructs. You will of course have to create extra indices on these columns to keep things fast.
2) Alternatively, and a lot more involved, you could create a special copy of the FULLTEXT columns that has such character sequences encoded as something that is searchable and then convert the users search string to match.
So, a contrived example would be to replace all 'c++' sequences with 'cpp' or 'c00' in a special column used just for searching. When the user types in 'c++' convert it to your encoded value before searching.
Best Luck,
Jesse Morrow
Subject
Views
Written By
Posted
4021
July 11, 2006 05:46AM
2605
July 17, 2006 05:33AM
2805
July 17, 2006 12:09PM
2615
October 11, 2006 04:36AM
Re: problems with searches for 'c#' and 'c++' fulltext
3786
March 30, 2007 06:32PM
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.