com.jalios.jcms.search.spell
Class SpellChecker.IndexSearcherWrapper

java.lang.Object
  extended by org.apache.lucene.search.Searcher
      extended by org.apache.lucene.search.IndexSearcher
          extended by com.jalios.jcms.search.spell.SpellChecker.IndexSearcherWrapper
All Implemented Interfaces:
org.apache.lucene.search.Searchable
Enclosing class:
SpellChecker

public class SpellChecker.IndexSearcherWrapper
extends org.apache.lucene.search.IndexSearcher

For optimized used of the searcher, we keep it open as much as possible and delay its close only when it is replaced by a new one when modifying index.


Constructor Summary
SpellChecker.IndexSearcherWrapper(org.apache.lucene.store.Directory dir)
           
 
Method Summary
 void close()
           
 SpellChecker.IndexSearcherWrapper getReference()
           
 
Methods inherited from class org.apache.lucene.search.IndexSearcher
doc, doc, docFreq, explain, gatherSubReaders, getIndexReader, maxDoc, rewrite, search, search, search, search, setDefaultFieldSortScoring
 
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs, explain, getSimilarity, search, search, search, search, search, search, search, search, search, search, search, search, setSimilarity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpellChecker.IndexSearcherWrapper

public SpellChecker.IndexSearcherWrapper(org.apache.lucene.store.Directory dir)
                                  throws IOException
Throws:
IOException
Method Detail

getReference

public SpellChecker.IndexSearcherWrapper getReference()

close

public void close()
           throws IOException
Specified by:
close in interface org.apache.lucene.search.Searchable
Overrides:
close in class org.apache.lucene.search.IndexSearcher
Throws:
IOException


Copyright © 2001-2010 Jalios SA. All Rights Reserved.