gpt4 book ai didi

mysql - 如何在 MySQL AWS Aurora DB InnoDB 引擎中创建全文搜索索引

转载 作者:行者123 更新时间:2023-12-02 00:54:32 24 4
gpt4 key购买 nike

在尝试在表上添加全文索引时,出现以下错误。

Error Code: 1214. The used table type doesn't support FULLTEXT indexes



在尝试使用 MyTSAM 引擎创建表时,我收到以下警告消息。

0 row(s) affected, 1 warning(s): 1266 Using storage engine InnoDB for table

最佳答案

AWS Aurora 支持全文索引。我们将它与 InnoDb (MySQL 5.7) 表一起使用,例如:

CREATE TABLE full_search_indexes (
code varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
entity_type varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
full_text text COLLATE utf8mb4_unicode_ci,
time_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
time_updated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (code,entity_type),
FULLTEXT KEY full_text (full_text)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

关于mysql - 如何在 MySQL AWS Aurora DB InnoDB 引擎中创建全文搜索索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55384549/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com