1.1 --- a/iixr/terms.py Fri Sep 18 01:39:08 2009 +0200
1.2 +++ b/iixr/terms.py Fri Sep 18 21:07:35 2009 +0200
1.3 @@ -36,8 +36,7 @@
1.4 """
1.5 Write the given 'term', its position file 'offset', its 'frequency' and
1.6 its 'doc_frequency' (number of documents in which it appears) to the
1.7 - term information file. Return the offset after the term information was
1.8 - written to the file.
1.9 + term information file.
1.10 """
1.11
1.12 # Write the prefix length and term suffix.
1.13 @@ -63,8 +62,6 @@
1.14 self.last_term = term
1.15 self.last_offset = offset
1.16
1.17 - return self.f.tell()
1.18 -
1.19 class TermReader(FileReader):
1.20
1.21 "Reading term information from files."
1.22 @@ -179,9 +176,10 @@
1.23 written to the file.
1.24 """
1.25
1.26 - info_offset = self.info_writer.write_term(term, offset, frequency, doc_frequency)
1.27 + self.info_writer.write_term(term, offset, frequency, doc_frequency)
1.28
1.29 if self.entry % self.interval == 0:
1.30 + info_offset = self.info_writer.f.tell()
1.31 self.index_writer.write_term(term, offset, frequency, doc_frequency, info_offset)
1.32
1.33 self.entry += 1