[zope2-tracker] [Bug 1236354] [NEW] BooleanIndex index becomes wrong when index value is inverted during a RE-indexation
Thomas Desvenain
1236354 at bugs.launchpad.net
Mon Oct 7 15:10:38 CEST 2013
Public bug reported:
This test (for now in tdesvenain fork) fails :
self.assertEqual(list(res), [1, 3, 4]) is wrong because '1' document is always indexed with False value
def test_reindexation_when_index_reversed(self):
index = self._makeOne()
obj1 = Dummy(1, False)
index._index_object(obj1.id, obj1, attr='truth')
obj2 = Dummy(2, False)
self.assertTrue(index._index_value)
index._index_object(obj2.id, obj2, attr='truth')
obj3 = Dummy(3, True)
index._index_object(obj3.id, obj3, attr='truth')
obj4 = Dummy(4, True)
index._index_object(obj4.id, obj4, attr='truth')
obj1.truth = True
index._index_object(obj1.id, obj1, attr='truth')
self.assertFalse(index._index_value)
res = index._apply_index({'truth': True})[0]
self.assertEqual(list(res), [1, 3, 4])
** Affects: zope2
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
https://bugs.launchpad.net/bugs/1236354
Title:
BooleanIndex index becomes wrong when index value is inverted during a
RE-indexation
To manage notifications about this bug go to:
https://bugs.launchpad.net/zope2/+bug/1236354/+subscriptions
More information about the zope2-tracker
mailing list