We have an application that needs to index every word (token) in a name,
separately.
Ex: "New York" must be indexed under "New" and "York".
One solution is to create an auxiliary table, extract the tokens one word
at a time, and cross-reference to the key of the original table.
Ex: CREATE TABLE places
( idp INT(8) NOT NULL,
place CHAR(32), /* Ex: "New York" */
PRIMARY KEY(idp)
)
CREATE TABLE tokens
( idt INT(8) NOT NULL AUTO_INCREMENT,
token CHAR(32), /* Ex: "New" OR "York" */
idp INT(8) /* refers to same key in 'places' */
PRIMARY KEY (idt),
INDEX (token)
)
Is there a faster/more elegant way to do this?
'FULLTEXT' is not suitable.
(Please forgive my na�vet�, I am new to MySQL).
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php