[Erp5-report] r42736 ivan - in /erp5/trunk/bt5/erp5_full_text_sphinxse_catalog: CatalogMeth...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 28 12:34:55 CET 2011
Author: ivan
Date: Fri Jan 28 12:34:55 2011
New Revision: 42736
URL: http://svn.erp5.org?rev=42736&view=rev
Log:
Define Sphinx's full_text key implementation.
Removed:
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogScriptableKeyTemplateItem/
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list
Modified:
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/change_log
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision
Modified: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml?rev=42736&r1=42735&r2=42736&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml [utf8] Fri Jan 28 12:34:55 2011
@@ -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>
Removed: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml?rev=42735&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_viewQuickSearchResultList.xml (removed)
@@ -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>
Modified: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/change_log?rev=42736&r1=42735&r2=42736&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/change_log [utf8] Fri Jan 28 12:34:55 2011
@@ -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.
Modified: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision?rev=42736&r1=42735&r2=42736&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision [utf8] Fri Jan 28 12:34:55 2011
@@ -1 +1 @@
-15
\ No newline at end of file
+18
\ No newline at end of file
Removed: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list?rev=42735&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/template_catalog_scriptable_key_list (removed)
@@ -1 +0,0 @@
-full_text | SQLCatalog_makeFullTextQuery
\ No newline at end of file
More information about the Erp5-report
mailing list