code: synchronized void close()
     {
        releaseWriterAndReaders();
        if (directory != null)
        {
           try
           {
              directory.close();
           }
           catch (IOException e)
           {
              directory = null;
           }
        }
     }
docs: Closes this index, releasing all held resources.