         # File lib/ferret/index.rb, line 691
    691:       def ensure_writer_open()
    692:         raise "tried to use a closed index" if not @open
    693:         return if @writer
    694:         if @reader
    695:           @searcher.close if @searcher
    696:           @reader.close
    697:           @reader = nil
    698:           @searcher = nil
    699:         end
    700:         @writer = IndexWriter.new(@options)
    701:       end