[Checkins] SVN: CMF_Extras/trunk/CMFCollector/C Conform to expectation of new CMFCore.CatalogTool in 'enumerateIndexes'

Tres Seaver tseaver at palladion.com
Fri Feb 2 13:12:17 EST 2007


Log message for revision 72332:
  Conform to expectation of new CMFCore.CatalogTool in 'enumerateIndexes'
  
  o Leave BBB for older CMF.
  
  use ZCTextIndex instead of antique/deprecated TextIndex.
  
  Fix up release history.
  
  

Changed:
  U   CMF_Extras/trunk/CMFCollector/CHANGES.txt
  U   CMF_Extras/trunk/CMFCollector/Collector.py

-=-
Modified: CMF_Extras/trunk/CMFCollector/CHANGES.txt
===================================================================
--- CMF_Extras/trunk/CMFCollector/CHANGES.txt	2007-02-02 18:09:41 UTC (rev 72331)
+++ CMF_Extras/trunk/CMFCollector/CHANGES.txt	2007-02-02 18:12:16 UTC (rev 72332)
@@ -1,9 +1,26 @@
 CMF Collector Changelog
 
-  CMFCollector 0.10
+  After CMFCollector 0.10
 
+    Features
+
+      - Moved the workflow configuration and installation to the Install
+        method, and removed now unnecessary .zexp
+
+      - Use ZCTextIndex, rather than antique/deprecated TextIndex, in
+        CollectorCatalog.
+
     Bug fixes
 
+      - Made file upload work for sites using ATCTFile.
+
+      - Fixed CollectorCatalog's 'enumerateIndexes' to conform to newer
+        CMF Catalog's expectations, with minimal BBB for old catalogs.
+
+  CMFCollector 0.10 (2005/06/20)
+
+    Bug fixes
+
       - Improved post CMF 1.5 compatibility.
 
       - Removed imports of WorkflowMethod which broke the product

Modified: CMF_Extras/trunk/CMFCollector/Collector.py
===================================================================
--- CMF_Extras/trunk/CMFCollector/Collector.py	2007-02-02 18:09:41 UTC (rev 72331)
+++ CMF_Extras/trunk/CMFCollector/Collector.py	2007-02-02 18:12:16 UTC (rev 72332)
@@ -497,25 +497,28 @@
     portal_type = 'Collector Catalog'
 
     def enumerateIndexes(self):
+        from Products.CMFCore.utils import SimpleRecord
+        plaintext_extra = SimpleRecord( lexicon_id='plaintext_lexicon'
+                                      , index_type='Okapi BM25 Rank'
+                                      )
         standard = CatalogTool.enumerateIndexes(self)
-        custom = (('status', 'FieldIndex'),
-                  ('topic', 'FieldIndex'),
-                  ('classification', 'FieldIndex'),
-                  ('importance', 'FieldIndex'),
-                  ('security_related', 'FieldIndex'),
-                  ('confidential', 'FieldIndex'),
-                  ('resolution', 'TextIndex'),
-                  ('submitter_id', 'FieldIndex'),
-                  ('submitter_email', 'FieldIndex'),
-                  ('version_info', 'TextIndex'),
-                  ('assigned_to', 'KeywordIndex'),
-                  ('upload_number', 'KeywordIndex')
+        custom = (('status', 'FieldIndex', None),
+                  ('topic', 'FieldIndex', None),
+                  ('classification', 'FieldIndex', None),
+                  ('importance', 'FieldIndex', None),
+                  ('security_related', 'FieldIndex', None),
+                  ('confidential', 'FieldIndex', None),
+                  ('resolution', 'ZCTextIndex', plaintext_extra),
+                  ('submitter_id', 'FieldIndex', None),
+                  ('submitter_email', 'FieldIndex', None),
+                  ('version_info', 'ZCTextIndex', plaintext_extra),
+                  ('assigned_to', 'KeywordIndex', None),
+                  ('upload_number', 'KeywordIndex', None)
                   )
-        if len(standard[0]) == 3:
-            # compatibility with recent CMFCore.CatalogTool
-            # XXX we should probably invert this test and BBB the 2-tuple result
-            custom = tuple([index_tuple + (None,)
-                            for index_tuple in custom])
+        if len(standard[0]) == 2:
+            # BBB compatibility with *old* CMFCore.CatalogTool
+            standard = tuple([index_tuple + (None,)
+                            for index_tuple in standard])
         return standard + custom
 
     def enumerateColumns( self ):



More information about the Checkins mailing list