Updated full text indexes

This commit is contained in:
Michael 2024-01-21 16:39:28 +00:00
parent 6389133575
commit 5a33a494e8
5 changed files with 14 additions and 16 deletions

View file

@ -1293,7 +1293,6 @@ CREATE TABLE IF NOT EXISTS `post-content` (
PRIMARY KEY(`uri-id`),
INDEX `plink` (`plink`(191)),
INDEX `resource-id` (`resource-id`),
FULLTEXT INDEX `title-content-warning-body` (`title`,`content-warning`,`body`),
INDEX `quote-uri-id` (`quote-uri-id`),
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
FOREIGN KEY (`quote-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
@ -1468,7 +1467,9 @@ CREATE TABLE IF NOT EXISTS `post-searchindex` (
`network` char(4) COMMENT '',
`private` tinyint unsigned COMMENT '0=public, 1=private, 2=unlisted',
`searchtext` mediumtext COMMENT 'Simplified text for the full text search',
`created` datetime COMMENT '',
PRIMARY KEY(`uri-id`),
INDEX `created` (`created`),
FULLTEXT INDEX `searchtext` (`searchtext`),
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Content for all posts';
@ -1724,7 +1725,6 @@ CREATE TABLE IF NOT EXISTS `profile` (
`net-publish` boolean NOT NULL DEFAULT '0' COMMENT 'publish profile in global directory',
PRIMARY KEY(`id`),
INDEX `uid_is-default` (`uid`,`is-default`),
FULLTEXT INDEX `pub_keywords` (`pub_keywords`),
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='user profiles data';

View file

@ -31,11 +31,10 @@ Indexes
------------
| Name | Fields |
| -------------------------- | -------------------------------------- |
| ------------ | ------------ |
| PRIMARY | uri-id |
| plink | plink(191) |
| resource-id | resource-id |
| title-content-warning-body | FULLTEXT, title, content-warning, body |
| quote-uri-id | quote-uri-id |
Foreign Keys

View file

@ -12,6 +12,7 @@ Fields
| network | | char(4) | YES | | NULL | |
| private | 0=public, 1=private, 2=unlisted | tinyint unsigned | YES | | NULL | |
| searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | |
| created | | datetime | YES | | NULL | |
Indexes
------------
@ -19,6 +20,7 @@ Indexes
| Name | Fields |
| ---------- | -------------------- |
| PRIMARY | uri-id |
| created | created |
| searchtext | FULLTEXT, searchtext |
Foreign Keys

View file

@ -57,10 +57,9 @@ Indexes
------------
| Name | Fields |
| -------------- | ---------------------- |
| -------------- | --------------- |
| PRIMARY | id |
| uid_is-default | uid, is-default |
| pub_keywords | FULLTEXT, pub_keywords |
Foreign Keys
------------

View file

@ -1319,7 +1319,6 @@ return [
"PRIMARY" => ["uri-id"],
"plink" => ["plink(191)"],
"resource-id" => ["resource-id"],
"title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"],
"quote-uri-id" => ["quote-uri-id"],
]
],
@ -1723,7 +1722,6 @@ return [
"indexes" => [
"PRIMARY" => ["id"],
"uid_is-default" => ["uid", "is-default"],
"pub_keywords" => ["FULLTEXT", "pub_keywords"],
]
],
"profile_field" => [