diff --git a/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml b/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml index 4ef490a377426926d3d7473dcf5219f75bec3228..1d93f5220b1f9df6b68b8a3cc62eee885e86ba8d 100644 --- a/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml +++ b/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml @@ -50,13 +50,12 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n + <value> <string>"""\n + Sphinx full text searchable key implementation.\n +"""\n +from Products.ZSQLCatalog.SQLCatalog import Query\n \n -# XXX Should we use system preference here?\n -if \'sphinxse_index\' in container.getCatalogSearchTableIds():\n - query = Query(**{\'sphinxse_query\':value})\n -else:\n - query = Query(**{\'full_text.SearchableText\':value})\n +query = Query(**{\'sphinxse_query\': value})\n return query\n </string> </value> </item> diff --git a/bt5/erp5_full_text_sphinxse_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml b/bt5/erp5_full_text_sphinxse_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml deleted file mode 100644 index 32208203186764dbd1205c82bf2d5213419fa268..0000000000000000000000000000000000000000 --- a/bt5/erp5_full_text_sphinxse_catalog/CatalogScriptableKeyTemplateItem/scriptable_key_list.xml +++ /dev/null @@ -1,3 +0,0 @@ -<key_list> - <key>full_text | SQLCatalog_makeFullTextQuery</key> -</key_list> \ No newline at end of file diff --git a/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml b/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml deleted file mode 100644 index e18bdbf4b1ffc4a8114a331ea7d1e27db2b239b3..0000000000000000000000000000000000000000 --- a/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?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>kw = {\'reset\':1,\n - \'full_text\':field_your_search_text,\n - \'your_search_text\':field_your_search_text,\n - \'all_languages\':all_languages,\n - \'ignore_hide_rows\': 1,\n - \'list_style\':list_style}\n -\n -if field_your_search_portal_type:\n - if field_your_search_portal_type == \'all\':\n - kw.update({\'portal_type\':list(context.getPortalDocumentTypeList())})\n - else:\n - kw.update({\'portal_type\':field_your_search_portal_type})\n -\n -web_section = context.getWebSectionValue()\n -if web_section is not None and \\\n - not bool(context.REQUEST.get(\'ignore_layout\', False)):\n - search_context = web_section\n - if list_style is None:\n - kw.update({\'list_style\':\'search\'})\n -else:\n - search_context = context.getPortalObject()\n -\n -if field_your_search_text in (\'\', None):\n - # no search criteria specified, refuse to conduct any search and \n - # show a message to user\n - kw[\'portal_status_message\'] = \'Please specify search criteria.\'\n - return search_context.Base_redirect(\'view\', keep_items=kw)\n - \n -return search_context.Base_redirect(field_your_search_form_id, keep_items=kw)\n -</string> </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string>field_your_search_text=\'\', field_your_search_portal_type=\'\', all_languages=None, list_style=None, field_your_search_form_id=\'ERP5Site_viewSearchResult\'</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>ERP5Site_viewQuickSearchResultList</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_full_text_sphinxse_catalog/bt/change_log b/bt5/erp5_full_text_sphinxse_catalog/bt/change_log index c1550f4549f537b78b671ddd05a74dc73420a653..1ad44edfde5df6da0d2e02da53a5ea145fc42ae9 100644 --- a/bt5/erp5_full_text_sphinxse_catalog/bt/change_log +++ b/bt5/erp5_full_text_sphinxse_catalog/bt/change_log @@ -1,3 +1,6 @@ +2011-01-28 Ivan +* Define Sphinx's full_text key implementation. + 2011-01-03 Kazuhiko * retrieve SearchableText from catalog, not calling SearchableText method. * Use InnoDB with non-deferred connection for full_text table, because we don't need fulltext search function of transactionless MyISAM engine. diff --git a/bt5/erp5_full_text_sphinxse_catalog/bt/revision b/bt5/erp5_full_text_sphinxse_catalog/bt/revision index 3f10ffe7a4c473619c926cfb1e8d95e726e5a0ec..25bf17fc5aaabd17402e77a2b16f95fbea7310d2 100644 --- a/bt5/erp5_full_text_sphinxse_catalog/bt/revision +++ b/bt5/erp5_full_text_sphinxse_catalog/bt/revision @@ -1 +1 @@ -15 \ No newline at end of file +18 \ No newline at end of file diff --git a/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list b/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list deleted file mode 100644 index d0aa506d2623c2a959a075db200fe93816dd3f5e..0000000000000000000000000000000000000000 --- a/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list +++ /dev/null @@ -1 +0,0 @@ -full_text | SQLCatalog_makeFullTextQuery \ No newline at end of file