Add full text index & search for document contents (related to #440)

This commit is contained in:
Marcus Hill
2022-04-15 11:42:50 +01:00
parent 9a48bfae49
commit 6aa06b4389
7 changed files with 52 additions and 14 deletions

6
db.sql
View File

@@ -397,6 +397,7 @@ CREATE TABLE `documents` (
`document_id` int(11) NOT NULL AUTO_INCREMENT,
`document_name` varchar(200) NOT NULL,
`document_content` longtext NOT NULL,
`document_content_raw` longtext NOT NULL,
`document_created_at` datetime NOT NULL,
`document_updated_at` datetime DEFAULT NULL,
`document_archived_at` datetime DEFAULT NULL,
@@ -409,6 +410,11 @@ CREATE TABLE `documents` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Indexes for table `documents`
--
ALTER TABLE `documents` ADD FULLTEXT KEY `document_content_raw` (`document_content_raw`);
--
-- Table structure for table `documents_tagged`
--