[Zope-Checkins] SVN: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/ showing number of indexed objects in the ZMI

Andreas Jung andreas at andreas-jung.com
Mon Jan 31 15:02:03 EST 2005


Log message for revision 29001:
  showing number of indexed objects in the ZMI
  

Changed:
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/dtml/manageDateIndex.dtml
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/dtml/manageDateRangeIndex.dtml
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/FieldIndex/dtml/manageFieldIndex.dtml
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/KeywordIndex/dtml/manageKeywordIndex.dtml
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/PathIndex/dtml/managePathIndex.dtml
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py

-=-
Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/dtml/manageDateIndex.dtml
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/dtml/manageDateIndex.dtml	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/dtml/manageDateIndex.dtml	2005-01-31 20:02:03 UTC (rev 29001)
@@ -2,7 +2,7 @@
 <dtml-var manage_tabs>
 
 <p class="form-help">
-Nothing to manage at this time.
+Objects indexed: <dtml-var numObjects>
 </p>
 
 

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/dtml/manageDateRangeIndex.dtml
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/dtml/manageDateRangeIndex.dtml	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/dtml/manageDateRangeIndex.dtml	2005-01-31 20:02:03 UTC (rev 29001)
@@ -6,6 +6,10 @@
 <emUpdate</em>.
 </p>
 
+<p>
+Objects indexed: <dtml-var numObjects>
+</p>
+
 <form action="&dtml-URL1;/manage_edit" method="POST">
 <table cellpadding="2" cellspacing="0" border="0">
 <tr>

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/FieldIndex/dtml/manageFieldIndex.dtml
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/FieldIndex/dtml/manageFieldIndex.dtml	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/FieldIndex/dtml/manageFieldIndex.dtml	2005-01-31 20:02:03 UTC (rev 29001)
@@ -2,7 +2,7 @@
 <dtml-var manage_tabs>
 
 <p class="form-help">
-Nothing to manage at this time.
+Objects indexed: <dtml-var numObjects>
 </p>
 
 

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/KeywordIndex/dtml/manageKeywordIndex.dtml
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/KeywordIndex/dtml/manageKeywordIndex.dtml	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/KeywordIndex/dtml/manageKeywordIndex.dtml	2005-01-31 20:02:03 UTC (rev 29001)
@@ -2,7 +2,7 @@
 <dtml-var manage_tabs>
 
 <p class="form-help">
-Nothing to manage at this time.
+Objects indexed: <dtml-var numObjects>
 </p>
 
 

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/PathIndex/dtml/managePathIndex.dtml
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/PathIndex/dtml/managePathIndex.dtml	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/PathIndex/dtml/managePathIndex.dtml	2005-01-31 20:02:03 UTC (rev 29001)
@@ -2,7 +2,7 @@
 <dtml-var manage_tabs>
 
 <p class="form-help">
-Nothing to manage at this time.
+Objects indexed: <dtml-var numObjects>
 </p>
 
 

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py	2005-01-31 19:28:55 UTC (rev 29000)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py	2005-01-31 20:02:03 UTC (rev 29001)
@@ -206,6 +206,9 @@
         # First we need to see if there's anything interesting to look at
         datum = self._get_object_datum(obj, attr)                        
 
+
+#        print self.getId(), obj.absolute_url(1), datum
+
         # We don't want to do anything that we don't have to here, so we'll
         # check to see if the new and existing information is the same.
         oldDatum = self._unindex.get(documentId, _marker)
@@ -241,9 +244,14 @@
 
     def numObjects(self):
         """ return number of indexed objects """
+        print 'numobjects', self.getId(), len(self._unindex)
+        return len(self._unindex)
+
+    def indexSize(self):
+        """ return of distinct values indexed"""
+        print 'indexSize', self.getId(), len(self)
         return len(self)
 
-
     def unindex_object(self, documentId):
         """ Unindex the object with integer id 'documentId' and don't
         raise an exception if we fail 



More information about the Zope-Checkins mailing list