WL#2556: Fulltext Index for MySQL Cluster

Affects: Server-7.1   —   Status: Un-Assigned   —   Priority: Medium

Many customers are asking for FULLTEXT indexes for MySQL Cluster

There are many ways to implement this.

A very quick solution can be implemented on handler level.
The idea is that the FULLTEXT index is a table that contains
a primary key that is the indexed words and as one attribute (a BLOB
attribute) a list of primary keys that has this word. There will be
a hash index and an ordered index on the word field.

This means that at INSERT one checks all fields in the FULLTEXT index and
appends a new primary key to the list in each word found in the row.

At UPDATE the same happens plus that the old_data is checked for words and
any words that are in both is not changed and any new words are appended to
its list and any removed words are removed from its list.

At DELETE all words in the record are removed from the lists for each word
present in the record.

When searching using the index one makes PK lookups for each word, also
ham% will be supported using the ordered index and %by is implemented
though full table scan.

It should be possible to implement this functionality completely on top of the
NDB API in the handler.