[Checkins] SVN: Products.ZCatalog/trunk/ In the path index, don't update data if the value hasn't changed.
Hanno Schlichting
hannosch at hannosch.eu
Wed May 4 04:36:44 EDT 2011
Log message for revision 121538:
In the path index, don't update data if the value hasn't changed.
Changed:
U Products.ZCatalog/trunk/CHANGES.txt
U Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/PathIndex.py
-=-
Modified: Products.ZCatalog/trunk/CHANGES.txt
===================================================================
--- Products.ZCatalog/trunk/CHANGES.txt 2011-05-04 06:58:32 UTC (rev 121537)
+++ Products.ZCatalog/trunk/CHANGES.txt 2011-05-04 08:36:44 UTC (rev 121538)
@@ -4,6 +4,7 @@
2.13.13 (unreleased)
--------------------
+- In the path index, don't update data if the value hasn't changed.
2.13.12 (2011-05-02)
--------------------
Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/PathIndex.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/PathIndex.py 2011-05-04 06:58:32 UTC (rev 121537)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/PathIndex/PathIndex.py 2011-05-04 08:36:44 UTC (rev 121538)
@@ -112,7 +112,11 @@
comps = filter(None, path.split('/'))
- if not self._unindex.has_key(docid):
+ old_value = self._unindex.get(docid, None)
+ if old_value == path:
+ return 0
+
+ if old_value is None:
self._length.change(1)
for i in range(len(comps)):
More information about the checkins
mailing list