|
30 | 30 | from threading import Lock |
31 | 31 |
|
32 | 32 | from whoosh.codec import base |
33 | | -from whoosh.matching import ListMatcher |
| 33 | +from whoosh.matching import ListMatcher, SkipListMatcher |
34 | 34 | from whoosh.reading import SegmentReader, TermInfo, TermNotFound |
35 | 35 | from whoosh.writing import SegmentWriter |
36 | 36 |
|
@@ -182,7 +182,7 @@ def has_vector(self, docnum, fieldname): |
182 | 182 | def vector(self, docnum, fieldname, format_): |
183 | 183 | items = self._segment._vectors[docnum][fieldname] |
184 | 184 | ids, weights, values = zip(*items) |
185 | | - return ListMatcher(ids, weights, values, format_) |
| 185 | + return SkipListMatcher(ids, weights, values, format_) |
186 | 186 |
|
187 | 187 | def stored_fields(self, docnum): |
188 | 188 | return self._segment._stored[docnum] |
@@ -284,7 +284,7 @@ def term_info(self, fieldname, text): |
284 | 284 | def matcher(self, fieldname, btext, format_, scorer=None): |
285 | 285 | items = self._invindex[fieldname][btext] |
286 | 286 | ids, weights, values = zip(*items) |
287 | | - return ListMatcher(ids, weights, values, format_, scorer=scorer) |
| 287 | + return SkipListMatcher(ids, weights, values, format_, scorer=scorer) |
288 | 288 |
|
289 | 289 | def indexed_field_names(self): |
290 | 290 | return self._invindex.keys() |
|
0 commit comments