def all_terms(self, termset=None, phrases=True):
        """Returns a set of all terms in this query tree.
        
        This method simply operates on the query itself, without reference
        to an index (unlike existing_terms()), so it will *not* add terms
        that require an index to compute, such as Prefix and Wildcard.
        
        >>> q = And([Term("content", u"render"), Term("path", u"/a/b")])
        >>> q.all_terms()
        set([("content", u"render"), ("path", u"/a/b")])
        
        :param phrases: Whether to add words found in Phrase queries.
        :rtype: set
        """
        
        if termset is None:
            termset = set()
        self._all_terms(termset, phrases=phrases)
        return termset
dataset/ETHPy150Open dokipen/whoosh/src/whoosh/query.py/Query.all_terms/original