SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near '`id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4' at line 16
4.0.3版本
张雨齐
2023 年6 月 22 日 15:17
#3
sql语法错误,检查一下这个sql,不是innodb
CREATE TABLE `zt_searchindex` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
`objectType` char(20) NOT NULL,
`objectID` mediumint(9) NOT NULL,
`title` text NOT NULL,
`content` text NOT NULL,
`addedDate` datetime NOT NULL,
`editedDate` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `object` (`objectType`,`objectID`),
KEY `addedDate` (`addedDate`),
FULLTEXT KEY `title` (`title`,`content`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
定位到这里了
CREATE FULLTEXT INDEX title_content
ON chandao
.zt_searchindex
(title
, content
) GLOBAL;
取消掉 FULLTEXT KEY title
(title
,content
) 可以创建
然后单独再用sql创建也报错
张雨齐
2023 年6 月 22 日 17:00
#7
应该是不支持full text吧。
我没有看到支持full text的说明。可以等官方社区支持给个准确支持与否的答复
张雨齐
2023 年6 月 25 日 07:46
#9
alter table add fulltext语法可能支持
可能仅限于语法支持而已
官网说明:
操作约束和索引
操作约束和索引包括添加约束和索引、删除约束和索引等。
朴悦
2023 年6 月 25 日 15:23
#10
fulltext类型,ob是支持的,不过有很多限制,现在在做全新的改造。odc客户端工具显示有该索引,但是在创建时会提示‘not supported’。