

def _existing_terms(self, ixreader, termset, reverse=False, phrases=True):
    if phrases:
        fieldname = self.fieldname
        fieldnum = ixreader.fieldname_to_num(fieldname)
        for word in self.words:
            contains = ((fieldnum, word) in ixreader)
            if reverse:
                contains = (not contains)
            if contains:
                termset.add((fieldname, word))

dataset/ETHPy150Open dokipen/whoosh/src/whoosh/query.py Phrase._existing_terms/original