def term_vector(id, field)
      @dir.synchronize do
        ensure_reader_open()
        if id.kind_of?(String) or id.kind_of?(Symbol)
          term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
          if term_doc_enum.next?
            id = term_doc_enum.doc
          else
            return nil
          end
        end
        return @reader.term_vector(id, field)
      end
    end
def term_vector(id, field)
      @dir.synchronize do
        ensure_reader_open()
        if id.kind_of?(String) or id.kind_of?(Symbol)
          term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
          if term_doc_enum.next?
            id = term_doc_enum.doc
          else
            return nil
          end
        end
        return @reader.term_vector(id, field)
      end
    end
Retrieves the term_vector for a document. The document can be referenced
 by either a string id to match the id field or an integer corresponding
 to Ferret's document number.

 See Ferret::Index::IndexReader#term_vector