diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.catalog_keys.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.catalog_keys.xml new file mode 100644 index 0000000000000000000000000000000000000000..a540f9431e9c394244ed71562b197938e6fe9258 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.catalog_keys.xml @@ -0,0 +1,2 @@ +<catalog_method> +</catalog_method> diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml new file mode 100644 index 0000000000000000000000000000000000000000..3cf4e8a3331207d6ecbc43d4ea8022f8d624e86f --- /dev/null +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""\n + Generic full text searchable key which based on site configuration will use\n + available third party search engine (Sphinx) or fall back to default \n + MySQL full text search.\n +"""\n +from Products.ZSQLCatalog.SQLCatalog import Query\n +\n +if context.SQLCatalog_isSphinxSearchAvailable():\n + query = Query(**{\'sphinxse_query\':value})\n +else:\n + query = Query(**{\'full_text.SearchableText\':value})\n +return query\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>value</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>SQLCatalog_makeFullTextQuery</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml index a0e5a4b0bbe62d645c9d08b27bacf3a9bcd4b86d..01f1277591962fdf1a22ab64a0e18e95e904b6ec 100644 --- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml @@ -1,4 +1,5 @@ <key_list> <key>advanced_search_text | SQLCatalog_makeQuickSearchQuery</key> + <key>full_text | SQLCatalog_makeFullTextQuery</key> <key>quick_search_text | SQLCatalog_makeQuickSearchQuery</key> </key_list> \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog.xml new file mode 100644 index 0000000000000000000000000000000000000000..69317d4e82b8af8ce6d4fcb4b5d6174bb9ac8bd0 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog.xml @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="OrderedFolder" module="OFS.OrderedFolder"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>erp5_mysql_innodb_catalog</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog/SQLCatalog_isSphinxSearchAvailable.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog/SQLCatalog_isSphinxSearchAvailable.xml new file mode 100644 index 0000000000000000000000000000000000000000..8796aeec466fc8e44d55da268f3fe507c878fcc5 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/SkinTemplateItem/portal_skins/erp5_mysql_innodb_catalog/SQLCatalog_isSphinxSearchAvailable.xml @@ -0,0 +1,81 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""\n + Used to check if Sphinx search is available.\n + Proxy mode added so this check can happen for anonymous users.\n +"""\n +# XXX Should we use system preference here?\n +portal_catalog = context.getPortalObject().portal_catalog\n +return \'sphinxse_index\' in getattr(portal_catalog, portal_catalog.default_sql_catalog_id).getCatalogSearchTableIds()\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>SQLCatalog_isSphinxSearchAvailable</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/change_log b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/change_log index a4542ee421896d8850b2842083c0679526449395..fc8e3d8f1be4f43002d9c5064ea68dab8d6e55c5 100644 --- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/change_log +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/change_log @@ -1,3 +1,6 @@ +2011-01-28 Ivan +* Add site configurable 'full_text' scriptable key + 2010-11-08 Kazuhiko * support cataloging multiple subjects. * subject related tables are moved from erp5_ingestion_mysql_innodb_catalog. diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision index 1e3852840b57172af41e4323ea5262e777f99916..02cfe0b571289e50a0fd82273cd7ef43b7d09185 100644 --- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision @@ -1 +1 @@ -211 \ No newline at end of file +213 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list index 659b79efcc66609fcb7d7f5b73f51cd1acc2054b..e9a42fb3187945966a919c62ec2868f50c2b1ecb 100644 --- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list @@ -1,5 +1,6 @@ erp5_mysql_innodb/SQLCatalog_catalogTransformation erp5_mysql_innodb/SQLCatalog_catalogTransformationList +erp5_mysql_innodb/SQLCatalog_makeFullTextQuery erp5_mysql_innodb/SQLCatalog_makeQuickSearchQuery erp5_mysql_innodb/z0_drop_alarm erp5_mysql_innodb/z0_drop_catalog diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_scriptable_key_list b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_scriptable_key_list index 4075eec4c0e23431b02267c7054a5fade7a30eba..5cb210d5906e58355b838de328421fc19640248a 100644 --- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_scriptable_key_list +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_scriptable_key_list @@ -1,2 +1,3 @@ quick_search_text | SQLCatalog_makeQuickSearchQuery -advanced_search_text | SQLCatalog_makeQuickSearchQuery \ No newline at end of file +advanced_search_text | SQLCatalog_makeQuickSearchQuery +full_text | SQLCatalog_makeFullTextQuery \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_skin_id_list b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_skin_id_list new file mode 100644 index 0000000000000000000000000000000000000000..1e510f863e46e4cb41e2f33d1560ae64a27c5882 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_skin_id_list @@ -0,0 +1 @@ +erp5_mysql_innodb_catalog \ No newline at end of file