

def expand_prefix(self, fieldid, prefix):
    'Yields terms in the given field that start with the given prefix.\n        '
    fieldid = self.schema.to_number(fieldid)
    for (fn, t, _, _) in self.iter_from(fieldid, prefix):
        if ((fn != fieldid) or (not t.startswith(prefix))):
            return
        (yield t)

dataset/ETHPy150Open dokipen/whoosh/src/whoosh/reading.py IndexReader.expand_prefix/original