MySQL Forums
Forum List  »  Full-Text Search

Adding Fulltext search without punctuation
Posted by: Lester Brook
Date: June 25, 2006 06:24PM

Hi All,

I'm just starting out with fulltext searching and I've run into a problem:

I have added a fulltext index to a number of columns and those columns are data that contain apostrophes i.e. fisherman's and fishermans.

I was doing a “like %<search term>%” against them but I wanted to relevance rank the results so I'm now doing a “match() against()” search.

The problem is that, if someone enters "fishermans" in the search box the results containing the term "fishermans" only are returned.

if someone enters "fisherman's" into the search box it is converted to "fisherman''s" and is therefore recognized as "fishermans" and once again only records containing the term "fishermans" are found.

I was getting around this problem in the “like %<search term>%” search by putting a "REPLACE(<column name> , '''', '')" in.

Is there a way of building the fulltext index so that, if a column contains the term "fisherman's" for example, it will get indexed as "fishermans" instead? i.e. is there a way can you strip the punctuation out of the index when it is being built?

Thanks and hope someone can help.

- Lester.

Options: ReplyQuote

Written By
Adding Fulltext search without punctuation
June 25, 2006 06:24PM

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.