Updated full text indexes
authorMichael <heluecht@pirati.ca>
Sun, 21 Jan 2024 16:39:28 +0000 (16:39 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 21 Jan 2024 16:39:28 +0000 (16:39 +0000)
database.sql
doc/database/db_post-content.md
doc/database/db_post-searchindex.md
doc/database/db_profile.md
static/dbstructure.config.php

index e3397a4..91ed8bf 100644 (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';
 
index 27b3720..be45975 100644 (file)
@@ -30,13 +30,12 @@ Fields
 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                           |
+| Name         | Fields       |
+| ------------ | ------------ |
+| PRIMARY      | uri-id       |
+| plink        | plink(191)   |
+| resource-id  | resource-id  |
+| quote-uri-id | quote-uri-id |
 
 Foreign Keys
 ------------
index a5dec8d..a6f5879 100644 (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
index c4a8b01..09f1077 100644 (file)
@@ -56,11 +56,10 @@ Fields
 Indexes
 ------------
 
-| Name           | Fields                 |
-| -------------- | ---------------------- |
-| PRIMARY        | id                     |
-| uid_is-default | uid, is-default        |
-| pub_keywords   | FULLTEXT, pub_keywords |
+| Name           | Fields          |
+| -------------- | --------------- |
+| PRIMARY        | id              |
+| uid_is-default | uid, is-default |
 
 Foreign Keys
 ------------
index 23c2553..b376778 100644 (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" => [