

def _find(self):
    isect = self.intersection
    slop = self.slop
    current = []
    while ((not current) and (isect.id is not None)):
        poses = self._poses()
        current = poses[0]
        for poslist in poses[1:]:
            newpositions = []
            for newpos in poslist:
                start = bisect_left(current, (newpos - slop))
                end = bisect_right(current, newpos)
                for curpos in current[start:end]:
                    delta = (newpos - curpos)
                    if (delta <= slop):
                        newpositions.append(newpos)
            current = newpositions
            if (not current):
                break
        if (not current):
            isect.next()
    self.count = len(current)
    self.id = isect.id

dataset/ETHPy150Open dokipen/whoosh/src/whoosh/query.py Phrase.PhraseScorer._find/original