mysqlindexingfull-text-searchmyisam

What does FULLTEXT indexing in MySQL understand as words?


Does it make any difference for MySQL FULLTEXT indexing in these both case and does the Index take 'words' separated by comma as Words for the Index?

option 1. ",11111,22222,33333,44444,55555," (words separated by comma)

option 2. "11111 22222 33333 44444 55555" (words separated by space)

both columns are TEXT in MyISAM table, with FULLTEXT index.

The questions is are those Words for the INDEX:

,1111,
,2222,
.....

ot it must be:

1111
2222
.....

Thank you! Best!

testing both with no significant difference in timing the results, but need to be sure.


Solution

  • From the documentation:

    The MySQL FULLTEXT implementation regards any sequence of true word characters (letters, digits, and underscores) as a word. That sequence may also contain apostrophes ('), but not more than one in a row. This means that aaa'bbb is regarded as one word, but aaa''bbb is regarded as two words. Apostrophes at the beginning or the end of a word are stripped by the FULLTEXT parser; 'aaa'bbb' would be parsed as aaa'bbb.

    The built-in FULLTEXT parser determines where words start and end by looking for certain delimiter characters; for example, (space), , (comma), and . (period)

    So your examples should be parsed the same whether the words are separated by space or comma.