diff --git a/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py b/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py index d4d983b7..1675834a 100644 --- a/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py +++ b/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py @@ -285,7 +285,7 @@ def profileSearch(query, warmup=False, verbose=False): # search must be roughly faster than default search if res1 and res2: self.assertLess( - 0.5 * duration2, + 0.4 * duration2, duration1, (duration2, duration1, query)) diff --git a/src/Products/PluginIndexes/unindex.py b/src/Products/PluginIndexes/unindex.py index 9110bb0a..add32595 100644 --- a/src/Products/PluginIndexes/unindex.py +++ b/src/Products/PluginIndexes/unindex.py @@ -504,7 +504,12 @@ def query_index(self, record, resultset=None): i_not_parm = self._apply_not(not_parm, resultset) if i_not_parm: return difference(resultset, i_not_parm) - record.keys = [k for k in index.keys() if k not in not_parm] + record.keys = list(index) + for parm in not_parm: + try: + record.keys.remove(parm) + except ValueError: + pass else: # convert query arguments into indexed format record.keys = list(map(self._convert, record.keys))