experimental_fulltext_index

The experimental_fulltext_index system variable controls whether the fulltext index plugin is enabled. When set to 0 (default), CREATE FULLTEXT INDEX statements are rejected and fulltext search queries (MATCH(...) AGAINST(...)) cannot use the index. Set it to 1 before creating a fulltext index to enable full-text search capabilities. This is an experimental feature gated by a session-level flag.

The experimental_fulltext_index system variable gates access to the fulltext index functionality in MatrixOne. When enabled, you can create fulltext indexes on text columns and use MATCH(...) AGAINST(...) syntax for full-text search queries. Fulltext indexes are registered through the index plugin framework and tracked in mo_catalog.mo_indexes. Because this is an experimental feature, the variable defaults to 0 and must be explicitly enabled before use.

Syntax

SET GLOBAL experimental_fulltext_index = 0; SET SESSION experimental_fulltext_index = 1;

Query the current value:

SHOW VARIABLES LIKE ‘experimental_fulltext_index’; SELECT @@experimental_fulltext_index;

Arguments

Property

Value

Variable Type

bool

Scope

Both

Dynamic

Yes

Default Value

0

Optional Value

0, 1

Examples

DROP DATABASE IF EXISTS ft_demo;
CREATE DATABASE ft_demo;
USE ft_demo;

SET experimental_fulltext_index = 1;

CREATE TABLE d(id INT PRIMARY KEY, body TEXT);
INSERT INTO d VALUES (1, 'hello world'), (2, 'foo bar baz'), (3, 'hello again');

CREATE FULLTEXT INDEX ftidx ON d(body);

SELECT id FROM d WHERE MATCH(body) AGAINST('hello');

SET experimental_fulltext_index = 0;

DROP TABLE d;
DROP DATABASE ft_demo;

Constraints

  • experimental_fulltext_index defaults to 0. Attempting CREATE FULLTEXT INDEX while the variable is 0 causes the operation to fail.

  • Fulltext indexes are registered through the index plugin framework and are tracked in mo_catalog.mo_indexes with their algorithm type and hidden-table type.

  • Fulltext indexes support MATCH(...) AGAINST(...) syntax for natural language search.

  • This is an experimental feature. Its behavior, performance characteristics, and API may change in future releases.