(self, q, for_deletion=False)
Returns an iterator of document numbers for documents matching the
        given :class:`whoosh.query.Query` object.
Returns an iterator of document numbers for documents matching the
        given :class:`whoosh.query.Query` object.
Returns an iterator of document numbers for documents matching the given : class : whoosh . query . Query object .
def docs_for_query(self, q, for_deletion=False):
        """Returns an iterator of document numbers for documents matching the
        given :class:`whoosh.query.Query` object.
        """

        # If we're getting the document numbers so we can delete them, use the
        # deletion_docs method instead of docs; this lets special queries
        # (e.g. nested queries) override what gets deleted
        if for_deletion:
            method = q.deletion_docs
        else:
            method = q.docs

        if self.subsearchers:
            for s, offset in self.subsearchers:
                for docnum in method(s):
                    yield docnum + offset
        else:
            for docnum in method(self):
                yield docnum
def docs_for_query ( self , q , for_deletion = False ) : # If we're getting the document numbers so we can delete them, use the # deletion_docs method instead of docs; this lets special queries # (e.g. nested queries) override what gets deleted if for_deletion : method = q . deletion_docs else : method = q . docs if self . subsearchers : for s , offset in self . subsearchers : for docnum in method ( s ) : yield docnum + offset else : for docnum in method ( self ) : yield docnum