1.1 --- a/iixr/positions.py Sat Sep 19 01:43:35 2009 +0200
1.2 +++ b/iixr/positions.py Sat Sep 19 21:36:32 2009 +0200
1.3 @@ -328,6 +328,7 @@
1.4 def __init__(self, position_opener, position_index_opener):
1.5 self.position_opener = position_opener
1.6 self.position_index_opener = position_index_opener
1.7 + self.position_dict_iterators = []
1.8
1.9 def read_term_positions(self, offset, doc_frequency):
1.10
1.11 @@ -336,11 +337,15 @@
1.12 given 'doc_frequency'.
1.13 """
1.14
1.15 - return PositionDictionaryIterator(self.position_opener,
1.16 + it = PositionDictionaryIterator(self.position_opener,
1.17 self.position_index_opener, offset, doc_frequency)
1.18 + self.position_dict_iterators.append(it)
1.19 + return it
1.20
1.21 def close(self):
1.22 - pass
1.23 + for it in self.position_dict_iterators:
1.24 + it.close()
1.25 + self.position_dict_iterators = []
1.26
1.27 class PositionDictionaryIterator:
1.28