I have table with two key fields:
- title (varchar)
- category_id (int)
I want to be able to get a distinct list of all tokens / words that form strings in the title field and count their occurrences in the whole table.
After an hour of research I have to admit I’m stumped on this one, hoping the community can offer some advice.
There is no built-in functionality in MySQL to accomplish this. You’ll need to write a function to split a varchar into tokens, or use an existing solution. In a script or stored procedure, you should be able to combine the split function with a
LIKEquery to determine how many times each token occurs.