From ac81ac7a4ccb41bf9c11a533964faaad05689125 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Thu, 20 Nov 2014 15:04:12 +0100 Subject: [PATCH] use TokenBigramSplitSymbolAlphaDigit parser instead of TokenBigramSplitSymbolAlpha by default. so that we have less misses even though we have more noises. to migrate, you can use the following SQL : ALTER TABLE catalog_full_text DROP KEY title, DROP KEY description, ENGINE=mroonga, ADD FULLTEXT KEY title (`title`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"', ADD FULLTEXT KEY description (`description`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'; ALTER TABLE content_translation DROP KEY translated_text, ENGINE=mroonga, ADD FULLTEXT KEY translated_text (`translated_text`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'; ALTER TABLE full_text DROP KEY SearchableText, ENGINE=mroonga, ADD FULLTEXT KEY SearchableText (`SearchableText`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"'; --- .../erp5_mysql_innodb/z_create_catalog_fulltext.xml | 4 ++-- .../erp5_mysql_innodb/z_create_content_translation.xml | 2 +- .../portal_catalog/erp5_mysql_innodb/z_create_fulltext.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml index 3cac0e0afb..916fbfe3ba 100644 --- a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml +++ b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml @@ -67,8 +67,8 @@ CREATE TABLE `catalog_full_text` (\n `title` varchar(255) default \'\',\n `description` text,\n PRIMARY KEY (`uid`),\n - FULLTEXT `title` (`title`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\',\n - FULLTEXT `description` (`description`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\'\n + FULLTEXT `title` (`title`) COMMENT \'parser "TokenBigramSplitSymbolAlphaDigit"\',\n + FULLTEXT `description` (`description`) COMMENT \'parser "TokenBigramSplitSymbolAlphaDigit"\'\n ) ENGINE=mroonga;\n </string> </value> </item> diff --git a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_content_translation.xml b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_content_translation.xml index 7b1a162804..76d01442a2 100644 --- a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_content_translation.xml +++ b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_content_translation.xml @@ -64,7 +64,7 @@ `content_language` VARBINARY(100),\n `translated_text` TEXT,\n PRIMARY KEY (`uid`, `property_name`, `content_language`),\n - FULLTEXT KEY (`translated_text`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\'\n + FULLTEXT KEY (`translated_text`) COMMENT \'parser "TokenBigramSplitSymbolAlphaDigit"\'\n ) ENGINE=mroonga;\n </string> </value> </item> diff --git a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_fulltext.xml b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_fulltext.xml index bcdfe1141f..9e1f6349af 100644 --- a/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_fulltext.xml +++ b/bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_fulltext.xml @@ -66,7 +66,7 @@ CREATE TABLE `full_text` (\n `uid` BIGINT UNSIGNED NOT NULL,\n `SearchableText` MEDIUMTEXT,\n PRIMARY KEY (`uid`),\n - FULLTEXT `SearchableText` (`SearchableText`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\'\n + FULLTEXT `SearchableText` (`SearchableText`) COMMENT \'parser "TokenBigramSplitSymbolAlphaDigit"\'\n ) ENGINE=mroonga;\n </string> </value> </item> -- 2.30.9