[Erp5-report] r41988 kazuhiko - in /erp5/trunk/bt5/erp5_full_text_sphinxse_catalog: SkinTem...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 4 13:48:05 CET 2011
Author: kazuhiko
Date: Tue Jan 4 13:48:05 2011
New Revision: 41988
URL: http://svn.erp5.org?rev=41988&view=rev
Log:
rewrite ERP5Site_reindexSphinxSE using SQLCatalog_deferSphinxSEIndexing.
Modified:
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_reindexSphinxSE.xml
erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/bt/revision
Modified: erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_reindexSphinxSE.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_reindexSphinxSE.xml?rev=41988&r1=41987&r2=41988&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_reindexSphinxSE.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_full_text_sphinxse_catalog/SkinTemplateItem/portal_skins/erp5_sphinxse/ERP5Site_reindexSphinxSE.xml [utf8] Tue Jan 4 13:48:05 2011
@@ -57,19 +57,12 @@ LIMIT = 100\n
\n
i = 0\n
while True:\n
- full_text_list = portal_catalog(select_list=(\'full_text.SearchableText\',), limit=(i*LIMIT, LIMIT))\n
+ full_text_list = portal_catalog(limit=(i*LIMIT, LIMIT))\n
if len(full_text_list) == 0:\n
break\n
- object_list = [dict(uid=x.uid, SearchableText=x.SearchableText) for x in full_text_list]\n
- parameter_dict = {}\n
- for x in object_list:\n
- for property in (\'uid\', \'SearchableText\'):\n
- parameter_dict.setdefault(property, []).append(x[property])\n
- sql_catalog.z_catalog_sphinxse_index_list(**parameter_dict)\n
- print \'Indexing %s documents...\' % (i*LIMIT + len(full_text_list))\n
+ sql_catalog.SQLCatalog_deferSphinxSEIndexing(getPath=[x.path for x in full_text_list])\n
i += 1\n
-print \'Done.\'\n
-return printed\n
+return \'SphinxSE index will be updated in background.\'\n
</string> </value>
</item>
<item>
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=41988&r1=41987&r2=41988&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] Tue Jan 4 13:48:05 2011
@@ -1 +1 @@
-13
\ No newline at end of file
+14
\ No newline at end of file
More information about the Erp5-report
mailing list