

def vector_as(self, astype, docnum, fieldid):
    'Returns an iterator of (termtext, value) pairs for the terms in the\n        given term vector. This is a convenient shortcut to calling vector()\n        and using the PostingReader object when all you want are the terms\n        and/or values.\n        \n        >>> docnum = searcher.document_number(path=u\'/a/b/c\')\n        >>> searcher.vector_as("frequency", docnum, "content")\n        [(u"apple", 3), (u"bear", 2), (u"cab", 2)]\n        \n        :param docnum: the document number of the document for which you want\n            the term vector.\n        :param fieldid: the field name or field number of the field for which\n            you want the term vector.\n        :param astype: a string containing the name of the format you\n            want the term vector\'s data in, for example "weights".\n        '
    vec = self.vector(docnum, fieldid)
    return vec.all_as(astype)

dataset/ETHPy150Open dokipen/whoosh/src/whoosh/reading.py IndexReader.vector_as/original