[Checkins] SVN: Products.ZCTextIndex/trunk/ Fixed problem in reindex document optimization, which could lead to negative document counts when reindexing unchanged documents.

Hanno Schlichting hannosch at hannosch.eu
Thu Jul 28 05:27:42 EDT 2011


Log message for revision 122382:
  Fixed problem in reindex document optimization, which could lead to negative document counts when reindexing unchanged documents.
  

Changed:
  U   Products.ZCTextIndex/trunk/CHANGES.txt
  U   Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/BaseIndex.py

-=-
Modified: Products.ZCTextIndex/trunk/CHANGES.txt
===================================================================
--- Products.ZCTextIndex/trunk/CHANGES.txt	2011-07-27 17:39:56 UTC (rev 122381)
+++ Products.ZCTextIndex/trunk/CHANGES.txt	2011-07-28 09:27:41 UTC (rev 122382)
@@ -4,6 +4,8 @@
 2.13.3 (unreleased)
 -------------------
 
+- Fixed problem in reindex document optimization, which could lead to negative
+  document counts when reindexing unchanged documents.
 
 2.13.2 (2011-05-04)
 -------------------

Modified: Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/BaseIndex.py
===================================================================
--- Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/BaseIndex.py	2011-07-27 17:39:56 UTC (rev 122381)
+++ Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/BaseIndex.py	2011-07-28 09:27:41 UTC (rev 122382)
@@ -128,7 +128,7 @@
         old_wids = self.get_words(docid)
         new_wids = self._lexicon.sourceToWordIds(text)
         if old_wids == new_wids:
-            return 0
+            return len(new_wids)
 
         old_wid2w, old_docw = self._get_frequencies(old_wids)
         new_wid2w, new_docw = self._get_frequencies(new_wids)



More information about the checkins mailing list