Hyper Open Edge Cloud

How To Use Tritonn Search

How To showing how to use Tritonns patched version of MySQL with better full text search using Senna.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

Tritonn is a patched version of MySQL that supports better fulltext search function with Senna.

Table of Contents

Why Tritonn

MySQL version after 3.23.23 supports FULLTEXT index. With it, MySQL can execute the full-text search for the field of VARCHAR and TEXT type. But, MySQL's fulltext search implementation has the following problems:

  • Insufficient Japanese/Chinese/Korean support
  • Slow phrase search
  • Slow update

With Tritonn, you get M17N fulltext search function, faster phrase search, and faster update WITHOUT modifying your application.

Installation

You can find RPM files for Mandriva in our RPM repository. See DownloadRpm for further information.

Setup

Add followings to mysqld section of /etc/my.cnf

# Use utf8 as the default character set.
default-character-set=utf8

# Ignore client information and use the default server character set.
skip-character-set-client-handshake

Now, please confirm if your database is already configured for utf8 or not.

mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

If all character_set_* except character_set_filesystem are already 'utf8', it is OK. If not, it is not OK.

If your database is already configured for utf8, you only need to recreate fulltext index by the followings:

mysql> ALTER TABLE full_text DROP INDEX SearchableText;
mysql> ALTER TABLE full_text ADD FULLTEXT INDEX `SearchableText` (`SearchableText`);

If your configuration is not utf8 unfortunately, you need to drop and recreate a database for ERP5, and reindex everything (you also need to recreate activity related tables if you use a same database for activity).

Related Articles