

def simplify(self, ixreader):
    self._split_queries()
    if self._subqueries:
        subs = self.__class__([subq.simplify(ixreader) for subq in self._subqueries], boost=self.boost)
        if self._notqueries:
            nots = Or([self._notqueries]).normalize().simplify()
            return AndNot(subs, nots)
        else:
            return subs
    else:
        return NullQuery

dataset/ETHPy150Open dokipen/whoosh/src/whoosh/query.py CompoundQuery.simplify/original