Commit b9a6b48f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make ERP5Site_reindexSphinxSE script much faster by not accessing ZODB.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38195 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 18be1c76
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
<value> <string>portal_catalog = context.portal_catalog\n <value> <string>portal_catalog = context.portal_catalog\n
sql_catalog = portal_catalog.getSQLCatalog(sql_catalog_id)\n sql_catalog = portal_catalog.getSQLCatalog(sql_catalog_id)\n
\n \n
LIMIT = 10\n LIMIT = 100\n
\n \n
i = 0\n i = 0\n
while True:\n while True:\n
full_text_list = portal_catalog(select_list=(\'full_text.SearchableText\',), limit=(i*LIMIT, LIMIT))\n full_text_list = portal_catalog(select_list=(\'full_text.SearchableText\',), limit=(i*LIMIT, LIMIT))\n
if len(full_text_list) == 0:\n if len(full_text_list) == 0:\n
break\n break\n
object_list = [dict(uid=x.getUid(), SearchableText=x.getSearchableText()) for x in full_text_list]\n object_list = [dict(uid=x.uid, SearchableText=x.SearchableText) for x in full_text_list]\n
parameter_dict = {}\n parameter_dict = {}\n
for x in object_list:\n for x in object_list:\n
for property in (\'uid\', \'SearchableText\'):\n for property in (\'uid\', \'SearchableText\'):\n
......
3 4
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment