experimental_fulltext_index¶
The
experimental_fulltext_indexsystem variable controls whether the fulltext index plugin is enabled. When set to0(default),CREATE FULLTEXT INDEXstatements are rejected and fulltext search queries (MATCH(...) AGAINST(...)) cannot use the index. Set it to1before 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 |
|
Scope |
|
Dynamic |
|
Default Value |
|
Optional Value |
|
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_indexdefaults to0. AttemptingCREATE FULLTEXT INDEXwhile the variable is0causes the operation to fail.Fulltext indexes are registered through the index plugin framework and are tracked in
mo_catalog.mo_indexeswith 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.