[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/ZCatalog/README.txt updated
Andreas Jung
andreas at andreas-jung.com
Wed Jul 21 09:54:55 EDT 2004
Log message for revision 26651:
updated
Changed:
U Zope/trunk/lib/python/Products/ZCatalog/README.txt
-=-
Modified: Zope/trunk/lib/python/Products/ZCatalog/README.txt
===================================================================
--- Zope/trunk/lib/python/Products/ZCatalog/README.txt 2004-07-21 13:43:59 UTC (rev 26650)
+++ Zope/trunk/lib/python/Products/ZCatalog/README.txt 2004-07-21 13:54:55 UTC (rev 26651)
@@ -63,12 +63,27 @@
Example to reindex a catalog using zopectl:
> zopectl debug
- >
+
From the zopectl shell:
+
> from Products.ZCatalog.ProgressHandler import StdoutHandler
> from Products.ZCatalog.ProgressHandler import ZLogHandler
+ >
+ > # Reference to the portal catalog of some CMF site unter
+ > # /cmfsite/portal_catalog
> cat = app.cmfsite.portal_catalog
+ >
+ > # Refreshing a single index
> cat.reindexIndex('SearchableText', None, pghandler=StdoutHandler())
+ >
+ > # Let's refresh the whole catalog
> cat.refreshCatalog(pghandler=ZLogHandler())
+ >
+ > # Don't forget to commit
+ > get_transaction().commit()
+
-
+ The constructor of the handler can be given an optional parameter
+ 'steps' (default is 100) that specifies after how much iterations
+ the progress should be reported.
+
More information about the Zope-Checkins
mailing list