Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created January 11, 2021 12:21
Show Gist options
  • Save jchristopher/b4c82c1ff1b2f746066e592cdaf212f2 to your computer and use it in GitHub Desktop.
Save jchristopher/b4c82c1ff1b2f746066e592cdaf212f2 to your computer and use it in GitHub Desktop.
CREATE TABLE `wp_searchwp_index` (
`indexid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`token` bigint(20) unsigned NOT NULL COMMENT 'Token ID',
`occurrences` bigint(20) unsigned NOT NULL COMMENT 'Number of token occurrences',
`id` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL COMMENT 'Source ID',
`attribute` varchar(80) COLLATE utf8mb4_unicode_520_ci NOT NULL COMMENT 'Attribute name',
`source` varchar(80) COLLATE utf8mb4_unicode_520_ci NOT NULL COMMENT 'Source name',
`site` mediumint(9) unsigned NOT NULL DEFAULT '1' COMMENT 'Site ID',
PRIMARY KEY (`indexid`),
KEY `source_idx` (`source`),
KEY `token_idx` (`token`),
KEY `attribute_idx` (`attribute`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE `wp_searchwp_log` (
`logid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`query` varchar(80) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL COMMENT 'Search query for this search',
`tstamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Timestamp of this search',
`hits` mediumint(9) unsigned NOT NULL COMMENT 'Number of results for this search',
`engine` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'default' COMMENT 'Engine used for this search',
`site` mediumint(9) unsigned NOT NULL DEFAULT '1' COMMENT 'Site where this search took place',
PRIMARY KEY (`logid`),
KEY `site_idx` (`site`),
KEY `engine_idx` (`engine`),
KEY `query_idx` (`query`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE `wp_searchwp_status` (
`statusid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`id` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL COMMENT 'Source ID',
`source` varchar(80) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
`queued` timestamp NULL DEFAULT NULL COMMENT 'Whether this entry is queued for indexing',
`indexed` timestamp NULL DEFAULT NULL COMMENT 'Whether this entry is indexed',
`omitted` timestamp NULL DEFAULT NULL COMMENT 'Whether this entry is omitted',
`site` bigint(20) unsigned NOT NULL COMMENT 'Site ID',
PRIMARY KEY (`statusid`),
KEY `id_idx` (`id`(191)),
KEY `site_idx` (`site`),
KEY `source_idx` (`source`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE `wp_searchwp_tokens` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Canonical ID for this token',
`token` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
`stem` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `token` (`token`),
KEY `token_idx` (`token`(2)),
KEY `stem_idx` (`stem`(2))
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment