Index: /contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java
===================================================================
--- /contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java	(revision 658607)
+++ /contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java	(working copy)
@@ -72,7 +72,6 @@
   private float bStart = 2.0f;
   private float bEnd = 1.0f;
 
-  private IndexReader reader;
   private IndexSearcher searcher;
 
   // minimum score for hits generated by the spell checker query
@@ -284,11 +283,12 @@
    * @throws IOException
    */
   public void clearIndex() throws IOException {
-    if (IndexReader.isLocked(spellIndex)){
-      IndexReader.unlock(spellIndex);
-    }
     IndexWriter writer = new IndexWriter(spellIndex, null, true);
     writer.close();
+    
+    //close the old searcher
+    searcher.close();
+    searcher = new IndexSearcher(this.spellIndex);
   }
 
   /**
@@ -298,10 +298,7 @@
    * @return true iff the word exists in the index
    */
   public boolean exist(String word) throws IOException {
-    if (reader == null) {
-      reader = IndexReader.open(spellIndex);
-    }
-    return reader.docFreq(new Term(F_WORD, word)) > 0;
+    return searcher.docFreq(new Term(F_WORD, word)) > 0;
   }
 
   /**
@@ -310,11 +307,7 @@
    * @throws IOException
    */
   public void indexDictionary(Dictionary dict) throws IOException {
-    if (IndexReader.isLocked(spellIndex)){
-      IndexReader.unlock(spellIndex);
-    }
-    IndexWriter writer = new IndexWriter(spellIndex, new WhitespaceAnalyzer(),
-        !IndexReader.indexExists(spellIndex));
+    IndexWriter writer = new IndexWriter(spellIndex, true, new WhitespaceAnalyzer());
     writer.setMergeFactor(300);
     writer.setMaxBufferedDocs(150);
 
@@ -338,12 +331,6 @@
     // close writer
     writer.optimize();
     writer.close();
-    // close reader so it will be re-opened (and see the new content) when exist()
-    // is called the next time:
-    if (reader != null) {
-      reader.close();
-      reader = null;
-    }
     // also re-open the spell index to see our own changes when the next suggestion
     // is fetched:
     searcher.close();
@@ -395,17 +382,4 @@
       }
     }
   }
-
-  /**
-   * Closes the internal IndexReader.
-   */
-  protected void finalize() throws Throwable {
-    try {
-      if (reader != null) {
-        reader.close();
-      }
-    } finally {
-      super.finalize();
-    }
-  }
 }
