1.1 --- a/iixr/index.py Thu Oct 01 00:27:29 2009 +0200
1.2 +++ b/iixr/index.py Fri Oct 02 00:22:10 2009 +0200
1.3 @@ -89,10 +89,11 @@
1.4 Building term information and writing it to the term and field dictionaries.
1.5 """
1.6
1.7 - def __init__(self, pathname, interval, doc_interval, flush_interval):
1.8 + def __init__(self, pathname, interval, doc_interval, field_interval, flush_interval):
1.9 self.pathname = pathname
1.10 self.interval = interval
1.11 self.doc_interval = doc_interval
1.12 + self.field_interval = field_interval
1.13 self.flush_interval = flush_interval
1.14
1.15 self.dict_partition = 0
1.16 @@ -231,7 +232,8 @@
1.17 "Return a writer."
1.18
1.19 self._ensure_directory()
1.20 - self.writer = IndexWriter(self.pathname, self.interval, self.doc_interval, self.flush_interval)
1.21 + self.writer = IndexWriter(self.pathname, self.interval, self.doc_interval,
1.22 + self.field_interval, self.flush_interval)
1.23 return self.writer
1.24
1.25 def _ensure_directory(self):
2.1 --- a/iixr/positions.py Thu Oct 01 00:27:29 2009 +0200
2.2 +++ b/iixr/positions.py Fri Oct 02 00:22:10 2009 +0200
2.3 @@ -324,7 +324,6 @@
2.4 def __init__(self, position_opener, position_index_opener):
2.5 self.position_opener = position_opener
2.6 self.position_index_opener = position_index_opener
2.7 - self.position_dict_iterators = []
2.8
2.9 def read_term_positions(self, offset, doc_frequency):
2.10
2.11 @@ -333,15 +332,11 @@
2.12 given 'doc_frequency'.
2.13 """
2.14
2.15 - it = PositionDictionaryIterator(self.position_opener,
2.16 + return PositionDictionaryIterator(self.position_opener,
2.17 self.position_index_opener, offset, doc_frequency)
2.18 - self.position_dict_iterators.append(it)
2.19 - return it
2.20
2.21 def close(self):
2.22 - for it in self.position_dict_iterators:
2.23 - it.close()
2.24 - self.position_dict_iterators = []
2.25 + pass
2.26
2.27 class PositionDictionaryIterator:
2.28