2009-08-31 | Paul Boddie | raw files shortlog changelog graph | Ensure document position ordering at the lowest level. | |
iixr.py (file) |
1.1 --- a/iixr.py Sun Aug 30 23:22:51 2009 +0200 1.2 +++ b/iixr.py Mon Aug 31 01:14:19 2009 +0200 1.3 @@ -238,6 +238,7 @@ 1.4 # Write the number of documents. 1.5 1.6 self.write_number(len(doc_positions)) 1.7 + doc_positions.sort() 1.8 1.9 # Write the positions. 1.10 1.11 @@ -1128,7 +1129,6 @@ 1.12 1.13 for term, doc_positions in terms: 1.14 doc_positions = doc_positions.items() 1.15 - doc_positions.sort() 1.16 dict_writer.write_term_positions(term, doc_positions) 1.17 1.18 dict_writer.close()