1.1 --- a/iixr.py Wed Sep 09 00:29:30 2009 +0200
1.2 +++ b/iixr.py Wed Sep 09 01:18:04 2009 +0200
1.3 @@ -26,6 +26,7 @@
1.4 from bisect import bisect_right # to find terms in the dictionary index
1.5 from bisect import insort_right # to maintain a sorted list of data for merging
1.6 import bz2, zlib # for field compression
1.7 +from itermerge import itermerge
1.8
1.9 try:
1.10 set
1.11 @@ -1311,11 +1312,9 @@
1.12 other_term, other_doc_positions, other_partition = entries[i]
1.13
1.14 # For such entries, merge the positions.
1.15 - # Since document positions should only appear in a single
1.16 - # partition, a simple update should be sufficient.
1.17
1.18 if other_term == term:
1.19 - doc_positions.update(other_doc_positions)
1.20 + doc_positions = itermerge(doc_positions, other_doc_positions)
1.21 to_update.append(other_partition)
1.22 i += 1
1.23 else: