         # File lib/ferret/index.rb, line 374
    374:     def doc(*args)
    375:       @dir.synchronize do
    376:         ensure_reader_open()
    377:         id = args[0]
    378:         if id.kind_of?(String) or id.kind_of?(Symbol)
    379:           term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
    380:           return term_doc_enum.next? ? @reader[term_doc_enum.doc] : nil
    381:         end
    382:         return @reader[*args]
    383:       end
    384:     end