1

Lets say we have 'ABCD1234EF' word in text. Now to find it, I have to match exact word. The goal is to find it by 'ABCD1234EF', 'ABCD', '1234' or 'EF' strings. NOT by 'CD12' or anything like it. Parameter 'ft_min_word_len' is set to 1.

It's only option to create second column and store splited values there? Could it be done by MySQL?

I have found something on MySQL site http://dev.mysql.com/doc/refman/5.1/en/full-text-plugins.html. But it brings more questions than it solves.

  • does it replace original mysql parser?
  • how to compile it on Windows machine?
Jan Pfeifer
  • 2,854
  • 25
  • 35

1 Answers1

0

I think the easiest route would be splitting your input string into three separate columns with SQL (based on something like this perhaps,).

Writting your own fulltext plugin essentially moves this logic to a lower with uncertain added value (reference):

The main parsing function, simple_parser_parse(), acts as a replacement for the built-in full-text parser, so it needs to split text into words and pass each word to the server.

This also answers your first bullet question: this procedure replaces the full-text parser (not the SQL parser, if this was your question).

The MySQL compilation instructions provide Windows-specific steps.

Community
  • 1
  • 1
RandomSeed
  • 29,301
  • 6
  • 52
  • 87
  • Indeed pure SQL approach would be ideal. But I have actually two columns I need to index. With multiple words, values with digits on all possible places. No rule applicable. Now I try to compile the plugin without a proper tool. Still learning. SQL trigger-like solution is still prefered. Any other non-SQL solution will work for sure too, but I'm trying to avoid it, because it will need a lot of changes in my app. – Jan Pfeifer Jan 21 '14 at 13:14