         # File lib/ferret/index.rb, line 471
    471:     def term_vector(id, field)
    472:       @dir.synchronize do
    473:         ensure_reader_open()
    474:         if id.kind_of?(String) or id.kind_of?(Symbol)
    475:           term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
    476:           if term_doc_enum.next?
    477:             id = term_doc_enum.doc
    478:           else
    479:             return nil
    480:           end
    481:         end
    482:         return @reader.term_vector(id, field)
    483:       end
    484:     end