You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full-text indexes can be used only with MyISAM and Aria tables, from MariaDB 10.0.5 with InnoDB tables and from MariaDB 10.0.15 with Mroonga tables, and can be created only for CHAR, VARCHAR, or TEXT columns.
I am not aware of any query that can check if there is FULLTEXT support. I guess you could simply issue the ALTER TABLE query and see if it fails or not, or you could check maybe what InnoDB or MariaDB version is available and make assumptions on that.
The text was updated successfully, but these errors were encountered:
Yeah, checking if the index has been created is one way.
Another check I'm adding is for the database version: if it's less than 5.6, FULLTEXT is not available. Looks like that will actually cover MariaDB as well – I suppose MariaDB versions lower than 10.0.5 and higher than 5.5 are rare enough.
Not-so-funny curiosity: MariaDB version 10 appears as 5.5.5 for $wpdb->db_version(). Not very helpful when we're checking for MySQL version 5.6 or above... Fortunately $wpdb->get_var("SELECT VERSION()") gives a better result, so that can be used to check for MariaDB versions.
You asked me how to detect if there is FULLTEXT support.
From https://mariadb.com/kb/en/full-text-index-overview/
I am not aware of any query that can check if there is FULLTEXT support. I guess you could simply issue the ALTER TABLE query and see if it fails or not, or you could check maybe what InnoDB or MariaDB version is available and make assumptions on that.
The text was updated successfully, but these errors were encountered: