experimental_fulltext2_index

The experimental_fulltext2_index system variable controls whether the FULLTEXT2 index engine is enabled. When set to 0 (default), CREATE FULLTEXT2 INDEX statements are rejected and MATCH(...) AGAINST(...) cannot use a FULLTEXT2 index. Set it to 1 before creating a FULLTEXT2 index to enable the engine.

The experimental_fulltext2_index system variable gates access to the FULLTEXT2 index engine in MatrixOne. When enabled, you can create FULLTEXT2 indexes on text columns and use MATCH(...) AGAINST(...) for phrase, boolean, and BM25 search. FULLTEXT2 is a WAND positional engine whose natural-language mode is an exact phrase match. Because this is an experimental feature, the variable defaults to 0 and must be explicitly enabled before use.

Syntax

SET GLOBAL experimental_fulltext2_index = 0; SET SESSION experimental_fulltext2_index = 1;

Query the current value:

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

Arguments

Property

Value

Variable Type

bool

Scope

Both

Dynamic

Yes

Default Value

0

Optional Value

0, 1

Examples

DROP DATABASE IF EXISTS ft2_gate_demo;
CREATE DATABASE ft2_gate_demo;
USE ft2_gate_demo;

SET experimental_fulltext2_index = 1;

CREATE TABLE docs (id BIGINT PRIMARY KEY, body TEXT);
INSERT INTO docs VALUES (1, 'hello world'), (2, 'foo bar baz');

CREATE FULLTEXT2 INDEX ftidx ON docs(body);

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

DROP DATABASE ft2_gate_demo;

Constraints

  • experimental_fulltext2_index defaults to 0. Attempting CREATE FULLTEXT2 INDEX while the variable is 0 causes the operation to fail.

  • FULLTEXT2 is distinct from the classic fulltext engine gated by experimental_fulltext_index; the two variables are independent.

  • FULLTEXT2 relevance is controlled by its own variable, ft2_relevancy_algorithm, which defaults to BM25.

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