MySQL Forums
Forum List  »  Full-Text Search

change the set of characters that are considered word characters & myisam/ftdefs.h
Posted by: Sebastien Salou
Date: July 04, 2007 03:51AM

Hi,
I would like to change the set of characters that are considered word characters.

I first chose to modify the mysql source in myisam/ftdefs.h and to recompile mysql.

I modified the line
#define misc_word_char(X) ((X)=='\'')
by
#define misc_word_char(X) ((X)=='-')

And it is working pretty well. I was able to search for french words like "adresse" on text like "l'adresse de votre domicile", and look for "X-men" in a list of movies.

After that, I decided to try the second method : Editing the <ctype><map> contents in the character set file sql/share/charsets/latin1.xml to specify for example that '-' is a “letter” and '\'' is a "delimiter" character.

I was surprised to find this :

<ctype>
<map>
00
20 20 20 20 20 20 20 20 20 28 28 28 28 28 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
84 84 84 84 84 84 84 84 84 84 10 10 10 10 10 10
10 81 81 81 81 81 81 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 10 10 10 10 10
10 82 82 82 82 82 82 02 02 02 02 02 02 02 02 02
02 02 02 02 02 02 02 02 02 02 02 10 10 10 10 20
10 00 10 02 10 10 10 10 10 10 01 10 01 00 01 00
00 10 10 10 10 10 10 10 10 10 02 10 02 00 02 01
48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 10 01 01 01 01 01 01 01 02
02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
02 02 02 02 02 02 02 10 02 02 02 02 02 02 02 02
</map>
</ctype>

I did not succeed to find a person who knows what does that mean, and how to modify it, so if someone here can clarify this point, I would be grateful !

thx

Sebastien Salou



Edited 1 time(s). Last edit at 07/04/2007 03:52AM by Sebastien Salou.

Options: ReplyQuote


Subject
Views
Written By
Posted
change the set of characters that are considered word characters & myisam/ftdefs.h
4049
July 04, 2007 03:51AM


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.