[Checkins] SVN: Products.ZCatalog/trunk/ Replaced `weightedIntersection` and `weightedUnion` calls with their non-weighted version, as we didn't pass in weights.
Hanno Schlichting
hannosch at hannosch.eu
Mon May 2 07:02:32 EDT 2011
Log message for revision 121503:
Replaced `weightedIntersection` and `weightedUnion` calls with their non-weighted version, as we didn't pass in weights.
Changed:
U Products.ZCatalog/trunk/CHANGES.txt
U Products.ZCatalog/trunk/src/Products/PluginIndexes/common/ResultList.py
U Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py
-=-
Modified: Products.ZCatalog/trunk/CHANGES.txt
===================================================================
--- Products.ZCatalog/trunk/CHANGES.txt 2011-05-02 09:10:28 UTC (rev 121502)
+++ Products.ZCatalog/trunk/CHANGES.txt 2011-05-02 11:02:32 UTC (rev 121503)
@@ -4,6 +4,8 @@
2.13.12 (unreleased)
--------------------
+- Replaced `weightedIntersection` and `weightedUnion` calls with their
+ non-weighted version, as we didn't pass in weights.
2.13.11 (2011-05-02)
--------------------
Modified: Products.ZCatalog/trunk/src/Products/PluginIndexes/common/ResultList.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/PluginIndexes/common/ResultList.py 2011-05-02 09:10:28 UTC (rev 121502)
+++ Products.ZCatalog/trunk/src/Products/PluginIndexes/common/ResultList.py 2011-05-02 11:02:32 UTC (rev 121503)
@@ -13,8 +13,8 @@
from BTrees.IIBTree import difference
from BTrees.IIBTree import IIBucket
-from BTrees.IIBTree import weightedIntersection
-from BTrees.IIBTree import weightedUnion
+from BTrees.IIBTree import intersection
+from BTrees.IIBTree import union as ii_union
from BTrees.OOBTree import OOSet
from BTrees.OOBTree import union
@@ -55,7 +55,7 @@
def __and__(self, x):
return self.__class__(
- weightedIntersection(self._dict, x._dict)[1],
+ intersection(self._dict, x._dict),
union(self._words, x._words),
self._index,
)
@@ -69,7 +69,7 @@
def __or__(self, x):
return self.__class__(
- weightedUnion(self._dict, x._dict)[1],
+ ii_union(self._dict, x._dict),
union(self._words, x._words),
self._index,
)
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py 2011-05-02 09:10:28 UTC (rev 121502)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/Catalog.py 2011-05-02 11:02:32 UTC (rev 121503)
@@ -26,7 +26,7 @@
from Products.PluginIndexes.interfaces import ILimitedResultIndex
import BTrees.Length
-from BTrees.IIBTree import intersection, weightedIntersection, IISet
+from BTrees.IIBTree import intersection, IISet
from BTrees.OIBTree import OIBTree
from BTrees.IOBTree import IOBTree
from Lazy import LazyMap, LazyCat, LazyValues
@@ -552,7 +552,7 @@
# provide detailed info about the pure intersection time
intersect_id = i + '#intersection'
cr.start_split(intersect_id)
- w, rs = weightedIntersection(rs, r)
+ rs = intersection(rs, r)
cr.stop_split(intersect_id)
# consider the time it takes to intersect the index result with
More information about the checkins
mailing list